home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / calendar / cal-mayan.elc.z / cal-mayan.elc
Emacs Compiled Lisp  |  1998-05-21  |  12.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v20 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 14 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 75 73 74 69 6e 62 |piled by| justinb|
|00000020| 40 65 62 6f 6e 79 2e 63 | 72 61 79 2e 63 6f 6d 20 |@ebony.c|ray.com |
|00000030| 6f 6e 20 4d 6f 6e 20 4d | 61 72 20 20 39 20 31 32 |on Mon M|ar 9 12|
|00000040| 3a 34 36 3a 31 32 20 31 | 39 39 38 0a 3b 3b 3b 20 |:46:12 1|998.;;; |
|00000050| 66 72 6f 6d 20 66 69 6c | 65 20 2f 68 6f 6d 65 2f |from fil|e /home/|
|00000060| 61 73 70 65 6e 30 37 2f | 6a 75 73 74 69 6e 62 2f |aspen07/|justinb/|
|00000070| 72 6f 6f 74 73 2f 66 72 | 65 65 77 61 72 65 2f 78 |roots/fr|eeware/x|
|00000080| 65 6d 61 63 73 2f 32 30 | 2e 33 2f 78 65 6d 61 63 |emacs/20|.3/xemac|
|00000090| 73 2d 32 30 2e 33 2f 6c | 69 73 70 2f 63 61 6c 65 |s-20.3/l|isp/cale|
|000000a0| 6e 64 61 72 2f 63 61 6c | 2d 6d 61 79 61 6e 2e 65 |ndar/cal|-mayan.e|
|000000b0| 6c 0a 3b 3b 3b 20 65 6d | 61 63 73 20 76 65 72 73 |l.;;; em|acs vers|
|000000c0| 69 6f 6e 20 32 30 2e 34 | 20 22 45 6d 65 72 61 6c |ion 20.4| "Emeral|
|000000d0| 64 22 20 58 45 6d 61 63 | 73 20 20 4c 75 63 69 64 |d" XEmac|s Lucid|
|000000e0| 2e 0a 3b 3b 3b 20 62 79 | 74 65 63 6f 6d 70 20 76 |..;;; by|tecomp v|
|000000f0| 65 72 73 69 6f 6e 20 32 | 2e 32 35 20 58 45 6d 61 |ersion 2|.25 XEma|
|00000100| 63 73 3b 20 32 32 2d 4d | 61 72 2d 39 36 2e 0a 3b |cs; 22-M|ar-96..;|
|00000110| 3b 3b 20 6f 70 74 69 6d | 69 7a 61 74 69 6f 6e 20 |;; optim|ization |
|00000120| 69 73 20 6f 6e 2e 0a 3b | 3b 3b 20 74 68 69 73 20 |is on..;|;; this |
|00000130| 66 69 6c 65 20 75 73 65 | 73 20 6f 70 63 6f 64 65 |file use|s opcode|
|00000140| 73 20 77 68 69 63 68 20 | 64 6f 20 6e 6f 74 20 65 |s which |do not e|
|00000150| 78 69 73 74 20 69 6e 20 | 45 6d 61 63 73 20 31 39 |xist in |Emacs 19|
|00000160| 2e 0a 0a 28 69 66 20 28 | 61 6e 64 20 28 62 6f 75 |...(if (|and (bou|
|00000170| 6e 64 70 20 27 65 6d 61 | 63 73 2d 76 65 72 73 69 |ndp 'ema|cs-versi|
|00000180| 6f 6e 29 0a 09 20 28 6f | 72 20 28 61 6e 64 20 28 |on).. (o|r (and (|
|00000190| 62 6f 75 6e 64 70 20 27 | 65 70 6f 63 68 3a 3a 76 |boundp '|epoch::v|
|000001a0| 65 72 73 69 6f 6e 29 20 | 65 70 6f 63 68 3a 3a 76 |ersion) |epoch::v|
|000001b0| 65 72 73 69 6f 6e 29 0a | 09 20 20 20 20 20 28 73 |ersion).|. (s|
|000001c0| 74 72 69 6e 67 2d 6c 65 | 73 73 70 20 65 6d 61 63 |tring-le|ssp emac|
|000001d0| 73 2d 76 65 72 73 69 6f | 6e 20 22 32 30 22 29 29 |s-versio|n "20"))|
|000001e0| 29 0a 20 20 20 20 28 65 | 72 72 6f 72 20 22 60 63 |). (e|rror "`c|
|000001f0| 61 6c 2d 6d 61 79 61 6e | 2e 65 6c 27 20 77 61 73 |al-mayan|.el' was|
|00000200| 20 63 6f 6d 70 69 6c 65 | 64 20 66 6f 72 20 45 6d | compile|d for Em|
|00000210| 61 63 73 20 32 30 22 29 | 29 0a 0a 28 6f 72 20 28 |acs 20")|)..(or (|
|00000220| 62 6f 75 6e 64 70 20 27 | 63 75 72 72 65 6e 74 2d |boundp '|current-|
|00000230| 6c 6f 61 64 2d 6c 69 73 | 74 29 20 28 73 65 74 71 |load-lis|t) (setq|
|00000240| 20 63 75 72 72 65 6e 74 | 2d 6c 6f 61 64 2d 6c 69 | current|-load-li|
|00000250| 73 74 20 6e 69 6c 29 29 | 0a 0a 0a 28 72 65 71 75 |st nil))|...(requ|
|00000260| 69 72 65 20 27 63 61 6c | 65 6e 64 61 72 29 0a 23 |ire 'cal|endar).#|
|00000270| 40 35 32 20 4e 6f 6e 2d | 6e 65 67 61 74 69 76 65 |@52 Non-|negative|
|00000280| 20 72 65 6d 61 69 6e 64 | 65 72 20 6f 66 20 4d 2f | remaind|er of M/|
|00000290| 4e 20 77 69 74 68 20 4e | 20 69 6e 73 74 65 61 64 |N with N| instead|
|000002a0| 20 6f 66 20 30 2e 1f 0a | 28 64 65 66 61 6c 69 61 | of 0...|(defalia|
|000002b0| 73 20 27 6d 61 79 61 6e | 2d 61 64 6a 75 73 74 65 |s 'mayan|-adjuste|
|000002c0| 64 2d 6d 6f 64 20 23 5b | 28 6d 20 6e 29 20 22 c0 |d-mod #[|(m n) ".|
|000002d0| 09 53 5c 6e 5c 22 54 87 | 22 20 5b 6d 6f 64 20 6d |.S\n\"T.|" [mod m|
|000002e0| 20 6e 5d 20 33 20 28 23 | 24 20 2e 20 36 32 38 29 | n] 3 (#|$ . 628)|
|000002f0| 5d 29 0a 23 40 33 33 32 | 20 4e 75 6d 62 65 72 20 |]).#@332| Number |
|00000300| 6f 66 20 64 61 79 73 20 | 6f 66 20 74 68 65 20 4d |of days |of the M|
|00000310| 61 79 61 6e 20 63 61 6c | 65 6e 64 61 72 20 65 70 |ayan cal|endar ep|
|00000320| 6f 63 68 20 62 65 66 6f | 72 65 20 61 62 73 6f 6c |och befo|re absol|
|00000330| 75 74 65 20 64 61 79 20 | 30 2e 0a 41 63 63 6f 72 |ute day |0..Accor|
|00000340| 64 69 6e 67 20 74 6f 20 | 74 68 65 20 47 6f 6f 64 |ding to |the Good|
|00000350| 6d 61 6e 2d 4d 61 72 74 | 69 6e 65 7a 2d 54 68 6f |man-Mart|inez-Tho|
|00000360| 6d 70 73 6f 6e 20 63 6f | 72 72 65 6c 61 74 69 6f |mpson co|rrelatio|
|00000370| 6e 2e 20 20 54 68 69 73 | 20 63 6f 72 72 65 6c 61 |n. This| correla|
|00000380| 74 69 6f 6e 20 69 73 0a | 6e 6f 74 20 75 6e 69 76 |tion is.|not univ|
|00000390| 65 72 73 61 6c 6c 79 20 | 61 63 63 65 70 74 65 64 |ersally |accepted|
|000003a0| 2c 20 61 73 20 69 74 20 | 73 74 69 6c 6c 20 61 20 |, as it |still a |
|000003b0| 73 75 62 6a 65 63 74 20 | 6f 66 20 61 73 74 72 6f |subject |of astro|
|000003c0| 2d 61 72 63 68 65 6f 6c | 6f 67 69 63 61 6c 0a 72 |-archeol|ogical.r|
|000003d0| 65 73 65 61 72 63 68 2e | 20 20 55 73 69 6e 67 20 |esearch.| Using |
|000003e0| 31 32 33 32 30 34 31 20 | 77 69 6c 6c 20 67 69 76 |1232041 |will giv|
|000003f0| 65 20 79 6f 75 20 53 70 | 69 6e 64 65 6e 27 73 20 |e you Sp|inden's |
|00000400| 63 6f 72 72 65 6c 61 74 | 69 6f 6e 3b 20 75 73 69 |correlat|ion; usi|
|00000410| 6e 67 0a 31 31 34 32 38 | 34 30 20 77 69 6c 6c 20 |ng.11428|40 will |
|00000420| 67 69 76 65 20 79 6f 75 | 20 48 6f 63 68 6c 65 69 |give you| Hochlei|
|00000430| 74 6e 65 72 27 73 20 63 | 6f 72 72 65 6c 61 74 69 |tner's c|orrelati|
|00000440| 6f 6e 2e 1f 0a 28 64 65 | 66 63 6f 6e 73 74 20 63 |on...(de|fconst c|
|00000450| 61 6c 65 6e 64 61 72 2d | 6d 61 79 61 6e 2d 64 61 |alendar-|mayan-da|
|00000460| 79 73 2d 62 65 66 6f 72 | 65 2d 61 62 73 6f 6c 75 |ys-befor|e-absolu|
|00000470| 74 65 2d 7a 65 72 6f 20 | 31 31 33 37 31 34 30 20 |te-zero |1137140 |
|00000480| 28 23 24 20 2e 20 37 36 | 31 29 29 0a 23 40 33 31 |(#$ . 76|1)).#@31|
|00000490| 20 4d 61 79 61 6e 20 68 | 61 61 62 20 64 61 74 65 | Mayan h|aab date|
|000004a0| 20 61 74 20 74 68 65 20 | 65 70 6f 63 68 2e 1f 0a | at the |epoch...|
|000004b0| 28 64 65 66 63 6f 6e 73 | 74 20 63 61 6c 65 6e 64 |(defcons|t calend|
|000004c0| 61 72 2d 6d 61 79 61 6e | 2d 68 61 61 62 2d 61 74 |ar-mayan|-haab-at|
|000004d0| 2d 65 70 6f 63 68 20 27 | 28 38 20 2e 20 31 38 29 |-epoch '|(8 . 18)|
|000004e0| 20 28 23 24 20 2e 20 31 | 31 36 39 29 29 0a 28 62 | (#$ . 1|169)).(b|
|000004f0| 79 74 65 2d 63 6f 64 65 | 20 22 c0 11 c1 5c 6e 42 |yte-code| "...\nB|
|00000500| 12 c1 87 22 20 5b 5b 22 | 50 6f 70 22 20 22 55 6f |..." [["|Pop" "Uo|
|00000510| 22 20 22 5a 69 70 22 20 | 22 5a 6f 74 7a 22 20 22 |" "Zip" |"Zotz" "|
|00000520| 54 7a 65 63 22 20 22 58 | 75 6c 22 20 22 59 61 78 |Tzec" "X|ul" "Yax|
|00000530| 6b 69 6e 22 20 22 4d 6f | 6c 22 20 22 43 68 65 6e |kin" "Mo|l" "Chen|
|00000540| 22 20 22 59 61 78 22 20 | 22 5a 61 63 22 20 22 43 |" "Yax" |"Zac" "C|
|00000550| 65 68 22 20 22 4d 61 63 | 22 20 22 4b 61 6e 6b 69 |eh" "Mac|" "Kanki|
|00000560| 6e 22 20 22 4d 75 61 6e | 22 20 22 50 61 78 22 20 |n" "Muan|" "Pax" |
|00000570| 22 4b 61 79 61 62 22 20 | 22 43 75 6d 6b 75 22 5d |"Kayab" |"Cumku"]|
|00000580| 20 63 61 6c 65 6e 64 61 | 72 2d 6d 61 79 61 6e 2d | calenda|r-mayan-|
|00000590| 68 61 61 62 2d 6d 6f 6e | 74 68 2d 6e 61 6d 65 2d |haab-mon|th-name-|
|000005a0| 61 72 72 61 79 20 63 75 | 72 72 65 6e 74 2d 6c 6f |array cu|rrent-lo|
|000005b0| 61 64 2d 6c 69 73 74 5d | 20 32 29 0a 23 40 33 34 |ad-list]| 2).#@34|
|000005c0| 20 4d 61 79 61 6e 20 74 | 7a 6f 6c 6b 69 6e 20 64 | Mayan t|zolkin d|
|000005d0| 61 74 65 20 61 74 20 74 | 68 65 20 65 70 6f 63 68 |ate at t|he epoch|
|000005e0| 2e 1f 0a 28 64 65 66 63 | 6f 6e 73 74 20 63 61 6c |...(defc|onst cal|
|000005f0| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 74 7a 6f 6c |endar-ma|yan-tzol|
|00000600| 6b 69 6e 2d 61 74 2d 65 | 70 6f 63 68 20 27 28 34 |kin-at-e|poch '(4|
|00000610| 20 2e 20 32 30 29 20 28 | 23 24 20 2e 20 31 34 37 | . 20) (|#$ . 147|
|00000620| 33 29 29 0a 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |3)).(byt|e-code "|
|00000630| c0 11 c1 5c 6e 42 12 c1 | 87 22 20 5b 5b 22 49 6d |...\nB..|." [["Im|
|00000640| 69 78 22 20 22 49 6b 22 | 20 22 41 6b 62 61 6c 22 |ix" "Ik"| "Akbal"|
|00000650| 20 22 4b 61 6e 22 20 22 | 43 68 69 63 63 68 61 6e | "Kan" "|Chicchan|
|00000660| 22 20 22 43 69 6d 69 22 | 20 22 4d 61 6e 69 6b 22 |" "Cimi"| "Manik"|
|00000670| 20 22 4c 61 6d 61 74 22 | 20 22 4d 75 6c 75 63 22 | "Lamat"| "Muluc"|
|00000680| 20 22 4f 63 22 20 22 43 | 68 75 65 6e 22 20 22 45 | "Oc" "C|huen" "E|
|00000690| 62 22 20 22 42 65 6e 22 | 20 22 49 78 22 20 22 4d |b" "Ben"| "Ix" "M|
|000006a0| 65 6e 22 20 22 43 69 62 | 22 20 22 43 61 62 61 6e |en" "Cib|" "Caban|
|000006b0| 22 20 22 45 74 7a 6e 61 | 62 22 20 22 43 61 75 61 |" "Etzna|b" "Caua|
|000006c0| 63 22 20 22 41 68 61 75 | 22 5d 20 63 61 6c 65 6e |c" "Ahau|"] calen|
|000006d0| 64 61 72 2d 6d 61 79 61 | 6e 2d 74 7a 6f 6c 6b 69 |dar-maya|n-tzolki|
|000006e0| 6e 2d 6e 61 6d 65 73 2d | 61 72 72 61 79 20 63 75 |n-names-|array cu|
|000006f0| 72 72 65 6e 74 2d 6c 6f | 61 64 2d 6c 69 73 74 5d |rrent-lo|ad-list]|
|00000700| 20 32 29 0a 23 40 36 36 | 20 43 6f 6d 70 75 74 65 | 2).#@66| Compute|
|00000710| 20 74 68 65 20 4d 61 79 | 61 6e 20 6c 6f 6e 67 20 | the May|an long |
|00000720| 63 6f 75 6e 74 20 63 6f | 72 72 65 73 70 6f 6e 64 |count co|rrespond|
|00000730| 69 6e 67 20 74 6f 20 74 | 68 65 20 61 62 73 6f 6c |ing to t|he absol|
|00000740| 75 74 65 20 44 41 54 45 | 2e 1f 0a 28 64 65 66 61 |ute DATE|...(defa|
|00000750| 6c 69 61 73 20 27 63 61 | 6c 65 6e 64 61 72 2d 6d |lias 'ca|lendar-m|
|00000760| 61 79 61 6e 2d 6c 6f 6e | 67 2d 63 6f 75 6e 74 2d |ayan-lon|g-count-|
|00000770| 66 72 6f 6d 2d 61 62 73 | 6f 6c 75 74 65 20 23 5b |from-abs|olute #[|
|00000780| 28 64 61 74 65 29 20 22 | 08 09 5c 5c 89 1a c3 a5 |(date) "|..\\....|
|00000790| 1c 5c 6e c3 a6 89 1d c6 | a5 1e 07 0d c6 a6 89 1d |.\n.....|........|
|000007a0| c8 a5 1e 09 0d c8 a6 89 | 1d ca a5 1e 0b 0d ca a6 |........|........|
|000007b0| 1e 0c 0c 0e 07 0e 09 0e | 0b 0e 0c af 05 2e 09 87 |........|........|
|000007c0| 22 20 5b 64 61 74 65 20 | 63 61 6c 65 6e 64 61 72 |" [date |calendar|
|000007d0| 2d 6d 61 79 61 6e 2d 64 | 61 79 73 2d 62 65 66 6f |-mayan-d|ays-befo|
|000007e0| 72 65 2d 61 62 73 6f 6c | 75 74 65 2d 7a 65 72 6f |re-absol|ute-zero|
|000007f0| 20 6c 6f 6e 67 2d 63 6f | 75 6e 74 20 31 34 34 30 | long-co|unt 1440|
|00000800| 30 30 20 62 61 6b 74 75 | 6e 20 72 65 6d 61 69 6e |00 baktu|n remain|
|00000810| 64 65 72 20 37 32 30 30 | 20 6b 61 74 75 6e 20 33 |der 7200| katun 3|
|00000820| 36 30 20 74 75 6e 20 32 | 30 20 75 69 6e 61 6c 20 |60 tun 2|0 uinal |
|00000830| 6b 69 6e 5d 20 36 20 28 | 23 24 20 2e 20 31 38 30 |kin] 6 (|#$ . 180|
|00000840| 31 29 5d 29 0a 23 40 35 | 37 20 43 6f 6e 76 65 72 |1)]).#@5|7 Conver|
|00000850| 74 20 4d 41 59 41 4e 2d | 4c 4f 4e 47 2d 43 4f 55 |t MAYAN-|LONG-COU|
|00000860| 4e 54 20 69 6e 74 6f 20 | 74 72 61 64 69 74 69 6f |NT into |traditio|
|00000870| 6e 61 6c 20 77 72 69 74 | 74 65 6e 20 66 6f 72 6d |nal writ|ten form|
|00000880| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 63 61 |...(defa|lias 'ca|
|00000890| 6c 65 6e 64 61 72 2d 6d | 61 79 61 6e 2d 6c 6f 6e |lendar-m|ayan-lon|
|000008a0| 67 2d 63 6f 75 6e 74 2d | 74 6f 2d 73 74 72 69 6e |g-count-|to-strin|
|000008b0| 67 20 23 5b 28 6d 61 79 | 61 6e 2d 6c 6f 6e 67 2d |g #[(may|an-long-|
|000008c0| 63 6f 75 6e 74 29 20 22 | c0 c1 c2 0b 42 5c 22 87 |count) "|....B\".|
|000008d0| 22 20 5b 61 70 70 6c 79 | 20 66 6f 72 6d 61 74 20 |" [apply| format |
|000008e0| 22 25 73 2e 25 73 2e 25 | 73 2e 25 73 2e 25 73 22 |"%s.%s.%|s.%s.%s"|
|000008f0| 20 6d 61 79 61 6e 2d 6c | 6f 6e 67 2d 63 6f 75 6e | mayan-l|ong-coun|
|00000900| 74 5d 20 34 20 28 23 24 | 20 2e 20 32 31 32 32 29 |t] 4 (#$| . 2122)|
|00000910| 5d 29 0a 23 40 37 30 20 | 47 69 76 65 6e 20 53 54 |]).#@70 |Given ST|
|00000920| 52 2c 20 61 20 73 74 72 | 69 6e 67 20 6f 66 20 66 |R, a str|ing of f|
|00000930| 6f 72 6d 61 74 20 22 25 | 64 2e 25 64 2e 25 64 2e |ormat "%|d.%d.%d.|
|00000940| 25 64 2e 25 64 22 2c 20 | 72 65 74 75 72 6e 20 6c |%d.%d", |return l|
|00000950| 69 73 74 20 6f 66 20 6e | 75 6d 73 2e 1f 0a 28 64 |ist of n|ums...(d|
|00000960| 65 66 61 6c 69 61 73 20 | 27 63 61 6c 65 6e 64 61 |efalias |'calenda|
|00000970| 72 2d 73 74 72 69 6e 67 | 2d 74 6f 2d 6d 61 79 61 |r-string|-to-maya|
|00000980| 6e 2d 6c 6f 6e 67 2d 63 | 6f 75 6e 74 20 23 5b 28 |n-long-c|ount #[(|
|00000990| 73 74 72 29 20 22 c0 09 | 47 c2 1b 1c 1d c6 c7 c8 |str) "..|G.......|
|000009a0| 8f 88 c9 0d 21 2b 87 22 | 20 5b 6e 69 6c 20 73 74 |....!+."| [nil st|
|000009b0| 72 20 30 20 63 63 20 63 | 20 72 6c 63 20 63 6f 6e |r 0 cc c| rlc con|
|000009c0| 64 69 74 69 6f 6e 20 28 | 62 79 74 65 2d 63 6f 64 |dition (|byte-cod|
|000009d0| 65 20 22 08 09 57 ab a2 | c2 c3 0c 08 23 1d c6 95 |e "..W..|....#...|
|000009e0| 1e 07 c8 1e 09 ca 0c 0d | 0e 07 4f 21 89 16 09 0e |........|..O!....|
|000009f0| 0b 42 16 0b 0e 07 10 2b | aa 59 0e 0b 47 cc 55 ac |.B.....+|.Y..G.U.|
|00000a00| 85 cd ce c8 5c 22 88 c8 | 87 22 20 5b 63 63 20 63 |....\"..|." [cc c|
|00000a10| 20 73 74 72 69 6e 67 2d | 6d 61 74 63 68 20 22 5b | string-|match "[|
|00000a20| 30 2d 39 5d 2b 22 20 73 | 74 72 20 73 74 61 72 74 |0-9]+" s|tr start|
|00000a30| 20 30 20 65 6e 64 20 6e | 69 6c 20 64 61 74 75 6d | 0 end n|il datum|
|00000a40| 20 72 65 61 64 20 72 6c | 63 20 35 20 73 69 67 6e | read rl|c 5 sign|
|00000a50| 61 6c 20 69 6e 76 61 6c | 69 64 2d 72 65 61 64 2d |al inval|id-read-|
|00000a60| 73 79 6e 74 61 78 5d 20 | 35 29 20 28 28 69 6e 76 |syntax] |5) ((inv|
|00000a70| 61 6c 69 64 2d 72 65 61 | 64 2d 73 79 6e 74 61 78 |alid-rea|d-syntax|
|00000a80| 29 29 20 72 65 76 65 72 | 73 65 5d 20 33 20 28 23 |)) rever|se] 3 (#|
|00000a90| 24 20 2e 20 32 33 32 38 | 29 5d 29 0a 23 40 35 36 |$ . 2328|)]).#@56|
|00000aa0| 20 43 6f 6e 76 65 72 74 | 20 61 62 73 6f 6c 75 74 | Convert| absolut|
|00000ab0| 65 20 44 41 54 45 20 69 | 6e 74 6f 20 61 20 4d 61 |e DATE i|nto a Ma|
|00000ac0| 79 61 6e 20 68 61 61 62 | 20 64 61 74 65 20 28 61 |yan haab| date (a|
|00000ad0| 20 70 61 69 72 29 2e 1f | 0a 28 64 65 66 61 6c 69 | pair)..|.(defali|
|00000ae0| 61 73 20 27 63 61 6c 65 | 6e 64 61 72 2d 6d 61 79 |as 'cale|ndar-may|
|00000af0| 61 6e 2d 68 61 61 62 2d | 66 72 6f 6d 2d 61 62 73 |an-haab-|from-abs|
|00000b00| 6f 6c 75 74 65 20 23 5b | 28 64 61 74 65 29 20 22 |olute #[|(date) "|
|00000b10| 08 09 5c 5c 89 1a 0b 40 | 5c 5c 0b 41 53 c4 5f 5c |..\\...@|\\.AS._\|
|00000b20| 5c c5 a6 89 1e 06 c4 a6 | 1e 07 0e 06 c4 a5 54 1e |\.......|......T.|
|00000b30| 08 0e 07 0e 08 2c 42 87 | 22 20 5b 64 61 74 65 20 |.....,B.|" [date |
|00000b40| 63 61 6c 65 6e 64 61 72 | 2d 6d 61 79 61 6e 2d 64 |calendar|-mayan-d|
|00000b50| 61 79 73 2d 62 65 66 6f | 72 65 2d 61 62 73 6f 6c |ays-befo|re-absol|
|00000b60| 75 74 65 2d 7a 65 72 6f | 20 6c 6f 6e 67 2d 63 6f |ute-zero| long-co|
|00000b70| 75 6e 74 20 63 61 6c 65 | 6e 64 61 72 2d 6d 61 79 |unt cale|ndar-may|
|00000b80| 61 6e 2d 68 61 61 62 2d | 61 74 2d 65 70 6f 63 68 |an-haab-|at-epoch|
|00000b90| 20 32 30 20 33 36 35 20 | 64 61 79 2d 6f 66 2d 68 | 20 365 |day-of-h|
|00000ba0| 61 61 62 20 64 61 79 20 | 6d 6f 6e 74 68 5d 20 34 |aab day |month] 4|
|00000bb0| 20 28 23 24 20 2e 20 32 | 37 32 31 29 5d 29 0a 23 | (#$ . 2|721)]).#|
|00000bc0| 40 37 37 20 4e 75 6d 62 | 65 72 20 6f 66 20 64 61 |@77 Numb|er of da|
|00000bd0| 79 73 20 66 72 6f 6d 20 | 4d 61 79 61 6e 20 68 61 |ys from |Mayan ha|
|00000be0| 61 62 20 44 41 54 45 31 | 20 74 6f 20 6e 65 78 74 |ab DATE1| to next|
|00000bf0| 20 6f 63 63 75 72 72 65 | 6e 63 65 20 6f 66 20 68 | occurre|nce of h|
|00000c00| 61 61 62 20 64 61 74 65 | 20 44 41 54 45 32 2e 1f |aab date| DATE2..|
|00000c10| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 63 61 6c 65 |.(defali|as 'cale|
|00000c20| 6e 64 61 72 2d 6d 61 79 | 61 6e 2d 68 61 61 62 2d |ndar-may|an-haab-|
|00000c30| 64 69 66 66 65 72 65 6e | 63 65 20 23 5b 28 64 61 |differen|ce #[(da|
|00000c40| 74 65 31 20 64 61 74 65 | 32 29 20 22 c0 09 41 5c |te1 date|2) "..A\|
|00000c50| 6e 41 5a c3 5f 09 40 5c | 6e 40 5a 5c 5c c4 5c 22 |nAZ._.@\|n@Z\\.\"|
|00000c60| 87 22 20 5b 6d 6f 64 20 | 64 61 74 65 32 20 64 61 |." [mod |date2 da|
|00000c70| 74 65 31 20 32 30 20 33 | 36 35 5d 20 34 20 28 23 |te1 20 3|65] 4 (#|
|00000c80| 24 20 2e 20 33 30 31 32 | 29 5d 29 0a 23 40 36 33 |$ . 3012|)]).#@63|
|00000c90| 20 41 62 73 6f 6c 75 74 | 65 20 64 61 74 65 20 6f | Absolut|e date o|
|00000ca0| 66 20 6c 61 74 65 73 74 | 20 48 41 41 42 2d 44 41 |f latest| HAAB-DA|
|00000cb0| 54 45 20 6f 6e 20 6f 72 | 20 62 65 66 6f 72 65 20 |TE on or| before |
|00000cc0| 61 62 73 6f 6c 75 74 65 | 20 44 41 54 45 2e 1f 0a |absolute| DATE...|
|00000cd0| 28 64 65 66 61 6c 69 61 | 73 20 27 63 61 6c 65 6e |(defalia|s 'calen|
|00000ce0| 64 61 72 2d 6d 61 79 61 | 6e 2d 68 61 61 62 2d 6f |dar-maya|n-haab-o|
|00000cf0| 6e 2d 6f 72 2d 62 65 66 | 6f 72 65 20 23 5b 28 68 |n-or-bef|ore #[(h|
|00000d00| 61 61 62 2d 64 61 74 65 | 20 64 61 74 65 29 20 22 |aab-date| date) "|
|00000d10| 08 89 c1 c2 c3 21 0c 5c | 22 5a c5 a6 5a 87 22 20 |.....!.\|"Z..Z." |
|00000d20| 5b 64 61 74 65 20 63 61 | 6c 65 6e 64 61 72 2d 6d |[date ca|lendar-m|
|00000d30| 61 79 61 6e 2d 68 61 61 | 62 2d 64 69 66 66 65 72 |ayan-haa|b-differ|
|00000d40| 65 6e 63 65 20 63 61 6c | 65 6e 64 61 72 2d 6d 61 |ence cal|endar-ma|
|00000d50| 79 61 6e 2d 68 61 61 62 | 2d 66 72 6f 6d 2d 61 62 |yan-haab|-from-ab|
|00000d60| 73 6f 6c 75 74 65 20 30 | 20 68 61 61 62 2d 64 61 |solute 0| haab-da|
|00000d70| 74 65 20 33 36 35 5d 20 | 35 20 28 23 24 20 2e 20 |te 365] |5 (#$ . |
|00000d80| 33 32 31 37 29 5d 29 0a | 23 40 38 33 20 4d 6f 76 |3217)]).|#@83 Mov|
|00000d90| 65 20 63 75 72 73 6f 72 | 20 74 6f 20 6e 65 78 74 |e cursor| to next|
|00000da0| 20 69 6e 73 74 61 6e 63 | 65 20 6f 66 20 4d 61 79 | instanc|e of May|
|00000db0| 61 6e 20 48 41 41 42 2d | 44 41 54 45 2e 20 0a 45 |an HAAB-|DATE. .E|
|00000dc0| 63 68 6f 20 4d 61 79 61 | 6e 20 64 61 74 65 20 69 |cho Maya|n date i|
|00000dd0| 66 20 4e 4f 45 43 48 4f | 20 69 73 20 74 2e 1f 0a |f NOECHO| is t...|
|00000de0| 28 64 65 66 61 6c 69 61 | 73 20 27 63 61 6c 65 6e |(defalia|s 'calen|
|00000df0| 64 61 72 2d 6e 65 78 74 | 2d 68 61 61 62 2d 64 61 |dar-next|-haab-da|
|00000e00| 74 65 20 23 5b 28 68 61 | 61 62 2d 64 61 74 65 20 |te #[(ha|ab-date |
|00000e10| 26 6f 70 74 69 6f 6e 61 | 6c 20 6e 6f 65 63 68 6f |&optiona|l noecho|
|00000e20| 29 20 22 c0 c1 c2 0b c4 | 20 89 1d 89 1d 41 41 40 |) ".....| ....AA@|
|00000e30| 29 53 1e 06 0d 1d c7 0d | 21 1e 08 c9 0d 21 1e 5c |)S......|!....!.\|
|00000e40| 6e cb 0d 21 1e 0c 0e 5c | 6e cd 0e 08 53 5f 5c 5c |n..!...\|n...S_\\|
|00000e50| 1e 0e 0e 08 cf 56 ab 98 | 0e 0e d0 d1 0e 08 5f 5c |.....V..|......_\|
|00000e60| 5c d2 a5 5a 16 0e d3 0e | 0c 21 ab 85 0e 0e 54 16 |\..Z....|.!....T.|
|00000e70| 0e 0e 0e 2d 0e 06 d4 5f | 5c 5c 0e 06 d1 a5 5c 5c |...-..._|\\....\\|
|00000e80| 0e 06 d5 a5 5b 5c 5c 0e | 06 d6 a5 5c 5c 2a d4 5c |....[\\.|...\\*.\|
|00000e90| 5c 5c 22 21 21 88 0e 17 | ae 82 d8 20 87 22 20 5b |\\"!!...|... ." [|
|00000ea0| 63 61 6c 65 6e 64 61 72 | 2d 67 6f 74 6f 2d 64 61 |calendar|-goto-da|
|00000eb0| 74 65 20 63 61 6c 65 6e | 64 61 72 2d 67 72 65 67 |te calen|dar-greg|
|00000ec0| 6f 72 69 61 6e 2d 66 72 | 6f 6d 2d 61 62 73 6f 6c |orian-fr|om-absol|
|00000ed0| 75 74 65 20 63 61 6c 65 | 6e 64 61 72 2d 6d 61 79 |ute cale|ndar-may|
|00000ee0| 61 6e 2d 68 61 61 62 2d | 6f 6e 2d 6f 72 2d 62 65 |an-haab-|on-or-be|
|00000ef0| 66 6f 72 65 20 68 61 61 | 62 2d 64 61 74 65 20 63 |fore haa|b-date c|
|00000f00| 61 6c 65 6e 64 61 72 2d | 63 75 72 73 6f 72 2d 74 |alendar-|cursor-t|
|00000f10| 6f 2d 64 61 74 65 20 64 | 61 74 65 20 70 72 69 6f |o-date d|ate prio|
|00000f20| 72 2d 79 65 61 72 73 20 | 65 78 74 72 61 63 74 2d |r-years |extract-|
|00000f30| 63 61 6c 65 6e 64 61 72 | 2d 6d 6f 6e 74 68 20 6d |calendar|-month m|
|00000f40| 6f 6e 74 68 20 65 78 74 | 72 61 63 74 2d 63 61 6c |onth ext|ract-cal|
|00000f50| 65 6e 64 61 72 2d 64 61 | 79 20 64 61 79 20 65 78 |endar-da|y day ex|
|00000f60| 74 72 61 63 74 2d 63 61 | 6c 65 6e 64 61 72 2d 79 |tract-ca|lendar-y|
|00000f70| 65 61 72 20 79 65 61 72 | 20 33 31 20 64 61 79 2d |ear year| 31 day-|
|00000f80| 6f 66 2d 79 65 61 72 20 | 32 20 32 33 20 34 20 31 |of-year |2 23 4 1|
|00000f90| 30 20 63 61 6c 65 6e 64 | 61 72 2d 6c 65 61 70 2d |0 calend|ar-leap-|
|00000fa0| 79 65 61 72 2d 70 20 33 | 36 35 20 31 30 30 20 34 |year-p 3|65 100 4|
|00000fb0| 30 30 20 6e 6f 65 63 68 | 6f 20 63 61 6c 65 6e 64 |00 noech|o calend|
|00000fc0| 61 72 2d 70 72 69 6e 74 | 2d 6d 61 79 61 6e 2d 64 |ar-print|-mayan-d|
|00000fd0| 61 74 65 5d 20 39 20 28 | 23 24 20 2e 20 33 34 36 |ate] 9 (|#$ . 346|
|00000fe0| 39 29 20 28 6c 69 73 74 | 20 28 63 61 6c 65 6e 64 |9) (list| (calend|
|00000ff0| 61 72 2d 72 65 61 64 2d | 6d 61 79 61 6e 2d 68 61 |ar-read-|mayan-ha|
|00001000| 61 62 2d 64 61 74 65 29 | 29 5d 29 0a 23 40 38 37 |ab-date)|)]).#@87|
|00001010| 20 4d 6f 76 65 20 63 75 | 72 73 6f 72 20 74 6f 20 | Move cu|rsor to |
|00001020| 70 72 65 76 69 6f 75 73 | 20 69 6e 73 74 61 6e 63 |previous| instanc|
|00001030| 65 20 6f 66 20 4d 61 79 | 61 6e 20 48 41 41 42 2d |e of May|an HAAB-|
|00001040| 44 41 54 45 2e 20 0a 45 | 63 68 6f 20 4d 61 79 61 |DATE. .E|cho Maya|
|00001050| 6e 20 64 61 74 65 20 69 | 66 20 4e 4f 45 43 48 4f |n date i|f NOECHO|
|00001060| 20 69 73 20 74 2e 1f 0a | 28 64 65 66 61 6c 69 61 | is t...|(defalia|
|00001070| 73 20 27 63 61 6c 65 6e | 64 61 72 2d 70 72 65 76 |s 'calen|dar-prev|
|00001080| 69 6f 75 73 2d 68 61 61 | 62 2d 64 61 74 65 20 23 |ious-haa|b-date #|
|00001090| 5b 28 68 61 61 62 2d 64 | 61 74 65 20 26 6f 70 74 |[(haab-d|ate &opt|
|000010a0| 69 6f 6e 61 6c 20 6e 6f | 65 63 68 6f 29 20 22 c0 |ional no|echo) ".|
|000010b0| c1 c2 0b c4 20 1d c6 0d | 21 53 1e 07 c8 0d 21 c9 |.... ...|!S....!.|
|000010c0| 0e 07 5f 5c 5c 0e 07 ca | a5 5c 5c 0e 07 cb a5 5b |.._\\...|.\\....[|
|000010d0| 5c 5c 0e 07 cc a5 5c 5c | 2a 53 5c 22 21 21 88 0e |\\....\\|*S\"!!..|
|000010e0| 0d ae 82 ce 20 87 22 20 | 5b 63 61 6c 65 6e 64 61 |.... ." |[calenda|
|000010f0| 72 2d 67 6f 74 6f 2d 64 | 61 74 65 20 63 61 6c 65 |r-goto-d|ate cale|
|00001100| 6e 64 61 72 2d 67 72 65 | 67 6f 72 69 61 6e 2d 66 |ndar-gre|gorian-f|
|00001110| 72 6f 6d 2d 61 62 73 6f | 6c 75 74 65 20 63 61 6c |rom-abso|lute cal|
|00001120| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 68 61 61 62 |endar-ma|yan-haab|
|00001130| 2d 6f 6e 2d 6f 72 2d 62 | 65 66 6f 72 65 20 68 61 |-on-or-b|efore ha|
|00001140| 61 62 2d 64 61 74 65 20 | 63 61 6c 65 6e 64 61 72 |ab-date |calendar|
|00001150| 2d 63 75 72 73 6f 72 2d | 74 6f 2d 64 61 74 65 20 |-cursor-|to-date |
|00001160| 64 61 74 65 20 65 78 74 | 72 61 63 74 2d 63 61 6c |date ext|ract-cal|
|00001170| 65 6e 64 61 72 2d 79 65 | 61 72 20 70 72 69 6f 72 |endar-ye|ar prior|
|00001180| 2d 79 65 61 72 73 20 63 | 61 6c 65 6e 64 61 72 2d |-years c|alendar-|
|00001190| 64 61 79 2d 6e 75 6d 62 | 65 72 20 33 36 35 20 34 |day-numb|er 365 4|
|000011a0| 20 31 30 30 20 34 30 30 | 20 6e 6f 65 63 68 6f 20 | 100 400| noecho |
|000011b0| 63 61 6c 65 6e 64 61 72 | 2d 70 72 69 6e 74 2d 6d |calendar|-print-m|
|000011c0| 61 79 61 6e 2d 64 61 74 | 65 5d 20 37 20 28 23 24 |ayan-dat|e] 7 (#$|
|000011d0| 20 2e 20 34 31 31 33 29 | 20 28 6c 69 73 74 20 28 | . 4113)| (list (|
|000011e0| 63 61 6c 65 6e 64 61 72 | 2d 72 65 61 64 2d 6d 61 |calendar|-read-ma|
|000011f0| 79 61 6e 2d 68 61 61 62 | 2d 64 61 74 65 29 29 5d |yan-haab|-date))]|
|00001200| 29 0a 23 40 36 39 20 43 | 6f 6e 76 65 72 74 20 4d |).#@69 C|onvert M|
|00001210| 61 79 61 6e 20 68 61 61 | 62 20 64 61 74 65 20 28 |ayan haa|b date (|
|00001220| 61 20 70 61 69 72 29 20 | 69 6e 74 6f 20 69 74 73 |a pair) |into its|
|00001230| 20 74 72 61 64 69 74 69 | 6f 6e 61 6c 20 77 72 69 | traditi|onal wri|
|00001240| 74 74 65 6e 20 66 6f 72 | 6d 2e 1f 0a 28 64 65 66 |tten for|m...(def|
|00001250| 61 6c 69 61 73 20 27 63 | 61 6c 65 6e 64 61 72 2d |alias 'c|alendar-|
|00001260| 6d 61 79 61 6e 2d 68 61 | 61 62 2d 74 6f 2d 73 74 |mayan-ha|ab-to-st|
|00001270| 72 69 6e 67 20 23 5b 28 | 68 61 61 62 29 20 22 08 |ring #[(|haab) ".|
|00001280| 41 08 40 19 89 1a c3 55 | ab 86 c4 c5 09 5c 22 aa |A.@....U|.....\".|
|00001290| 89 c4 c6 09 0e 07 5c 6e | 53 48 23 2a 87 22 20 5b |......\n|SH#*." [|
|000012a0| 68 61 61 62 20 64 61 79 | 20 6d 6f 6e 74 68 20 31 |haab day| month 1|
|000012b0| 39 20 66 6f 72 6d 61 74 | 20 22 25 64 20 55 61 79 |9 format| "%d Uay|
|000012c0| 65 62 22 20 22 25 64 20 | 25 73 22 20 63 61 6c 65 |eb" "%d |%s" cale|
|000012d0| 6e 64 61 72 2d 6d 61 79 | 61 6e 2d 68 61 61 62 2d |ndar-may|an-haab-|
|000012e0| 6d 6f 6e 74 68 2d 6e 61 | 6d 65 2d 61 72 72 61 79 |month-na|me-array|
|000012f0| 5d 20 36 20 28 23 24 20 | 2e 20 34 36 31 35 29 5d |] 6 (#$ |. 4615)]|
|00001300| 29 0a 23 40 35 39 20 43 | 6f 6e 76 65 72 74 20 61 |).#@59 C|onvert a|
|00001310| 62 73 6f 6c 75 74 65 20 | 44 41 54 45 20 69 6e 74 |bsolute |DATE int|
|00001320| 6f 20 61 20 4d 61 79 61 | 6e 20 74 7a 6f 6c 6b 69 |o a Maya|n tzolki|
|00001330| 6e 20 64 61 74 65 20 28 | 61 20 70 61 69 72 29 2e |n date (|a pair).|
|00001340| 1f 0a 28 64 65 66 61 6c | 69 61 73 20 27 63 61 6c |..(defal|ias 'cal|
|00001350| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 74 7a 6f 6c |endar-ma|yan-tzol|
|00001360| 6b 69 6e 2d 66 72 6f 6d | 2d 61 62 73 6f 6c 75 74 |kin-from|-absolut|
|00001370| 65 20 23 5b 28 64 61 74 | 65 29 20 22 08 09 5c 5c |e #[(dat|e) "..\\|
|00001380| 1a c3 5c 6e 0c 40 5c 5c | c5 5c 22 1e 06 c3 5c 6e |..\n.@\\|.\"...\n|
|00001390| 0c 41 5c 5c c7 5c 22 1e | 08 0e 06 0e 08 2b 42 87 |.A\\.\".|.....+B.|
|000013a0| 22 20 5b 64 61 74 65 20 | 63 61 6c 65 6e 64 61 72 |" [date |calendar|
|000013b0| 2d 6d 61 79 61 6e 2d 64 | 61 79 73 2d 62 65 66 6f |-mayan-d|ays-befo|
|000013c0| 72 65 2d 61 62 73 6f 6c | 75 74 65 2d 7a 65 72 6f |re-absol|ute-zero|
|000013d0| 20 6c 6f 6e 67 2d 63 6f | 75 6e 74 20 6d 61 79 61 | long-co|unt maya|
|000013e0| 6e 2d 61 64 6a 75 73 74 | 65 64 2d 6d 6f 64 20 63 |n-adjust|ed-mod c|
|000013f0| 61 6c 65 6e 64 61 72 2d | 6d 61 79 61 6e 2d 74 7a |alendar-|mayan-tz|
|00001400| 6f 6c 6b 69 6e 2d 61 74 | 2d 65 70 6f 63 68 20 31 |olkin-at|-epoch 1|
|00001410| 33 20 64 61 79 20 32 30 | 20 6e 61 6d 65 5d 20 33 |3 day 20| name] 3|
|00001420| 20 28 23 24 20 2e 20 34 | 38 37 31 29 5d 29 0a 23 | (#$ . 4|871)]).#|
|00001430| 40 37 38 20 4e 75 6d 62 | 65 72 20 6f 66 20 64 61 |@78 Numb|er of da|
|00001440| 79 73 20 66 72 6f 6d 20 | 4d 61 79 61 6e 20 74 7a |ys from |Mayan tz|
|00001450| 6f 6c 6b 69 6e 20 44 41 | 54 45 31 20 74 6f 20 6e |olkin DA|TE1 to n|
|00001460| 65 78 74 20 6f 63 63 75 | 72 72 65 6e 63 65 20 6f |ext occu|rrence o|
|00001470| 66 20 74 7a 6f 6c 6b 69 | 6e 20 44 41 54 45 32 2e |f tzolki|n DATE2.|
|00001480| 1f 0a 28 64 65 66 61 6c | 69 61 73 20 27 63 61 6c |..(defal|ias 'cal|
|00001490| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 74 7a 6f 6c |endar-ma|yan-tzol|
|000014a0| 6b 69 6e 2d 64 69 66 66 | 65 72 65 6e 63 65 20 23 |kin-diff|erence #|
|000014b0| 5b 28 64 61 74 65 31 20 | 64 61 74 65 32 29 20 22 |[(date1 |date2) "|
|000014c0| 08 40 09 40 5a 08 41 09 | 41 5a 1a 1b c4 0b c4 0b |.@.@Z.A.|AZ......|
|000014d0| 5c 6e 5a c5 5f c6 5c 22 | c7 5f 5c 5c c8 5c 22 2a |\nZ._.\"|._\\.\"*|
|000014e0| 87 22 20 5b 64 61 74 65 | 32 20 64 61 74 65 31 20 |." [date|2 date1 |
|000014f0| 6e 61 6d 65 2d 64 69 66 | 66 65 72 65 6e 63 65 20 |name-dif|ference |
|00001500| 6e 75 6d 62 65 72 2d 64 | 69 66 66 65 72 65 6e 63 |number-d|ifferenc|
|00001510| 65 20 6d 6f 64 20 33 20 | 32 30 20 31 33 20 32 36 |e mod 3 |20 13 26|
|00001520| 30 5d 20 35 20 28 23 24 | 20 2e 20 35 31 37 32 29 |0] 5 (#$| . 5172)|
|00001530| 5d 29 0a 23 40 36 36 20 | 41 62 73 6f 6c 75 74 65 |]).#@66 |Absolute|
|00001540| 20 64 61 74 65 20 6f 66 | 20 6c 61 74 65 73 74 20 | date of| latest |
|00001550| 54 5a 4f 4c 4b 49 4e 2d | 44 41 54 45 20 6f 6e 20 |TZOLKIN-|DATE on |
|00001560| 6f 72 20 62 65 66 6f 72 | 65 20 61 62 73 6f 6c 75 |or befor|e absolu|
|00001570| 74 65 20 44 41 54 45 2e | 1f 0a 28 64 65 66 61 6c |te DATE.|..(defal|
|00001580| 69 61 73 20 27 63 61 6c | 65 6e 64 61 72 2d 6d 61 |ias 'cal|endar-ma|
|00001590| 79 61 6e 2d 74 7a 6f 6c | 6b 69 6e 2d 6f 6e 2d 6f |yan-tzol|kin-on-o|
|000015a0| 72 2d 62 65 66 6f 72 65 | 20 23 5b 28 74 7a 6f 6c |r-before| #[(tzol|
|000015b0| 6b 69 6e 2d 64 61 74 65 | 20 64 61 74 65 29 20 22 |kin-date| date) "|
|000015c0| 08 89 c1 c2 c3 21 0c 5c | 22 5a c5 a6 5a 87 22 20 |.....!.\|"Z..Z." |
|000015d0| 5b 64 61 74 65 20 63 61 | 6c 65 6e 64 61 72 2d 6d |[date ca|lendar-m|
|000015e0| 61 79 61 6e 2d 74 7a 6f | 6c 6b 69 6e 2d 64 69 66 |ayan-tzo|lkin-dif|
|000015f0| 66 65 72 65 6e 63 65 20 | 63 61 6c 65 6e 64 61 72 |ference |calendar|
|00001600| 2d 6d 61 79 61 6e 2d 74 | 7a 6f 6c 6b 69 6e 2d 66 |-mayan-t|zolkin-f|
|00001610| 72 6f 6d 2d 61 62 73 6f | 6c 75 74 65 20 30 20 74 |rom-abso|lute 0 t|
|00001620| 7a 6f 6c 6b 69 6e 2d 64 | 61 74 65 20 32 36 30 5d |zolkin-d|ate 260]|
|00001630| 20 35 20 28 23 24 20 2e | 20 35 34 33 32 29 5d 29 | 5 (#$ .| 5432)])|
|00001640| 0a 23 40 38 36 20 4d 6f | 76 65 20 63 75 72 73 6f |.#@86 Mo|ve curso|
|00001650| 72 20 74 6f 20 6e 65 78 | 74 20 69 6e 73 74 61 6e |r to nex|t instan|
|00001660| 63 65 20 6f 66 20 4d 61 | 79 61 6e 20 54 5a 4f 4c |ce of Ma|yan TZOL|
|00001670| 4b 49 4e 2d 44 41 54 45 | 2e 20 0a 45 63 68 6f 20 |KIN-DATE|. .Echo |
|00001680| 4d 61 79 61 6e 20 64 61 | 74 65 20 69 66 20 4e 4f |Mayan da|te if NO|
|00001690| 45 43 48 4f 20 69 73 20 | 74 2e 1f 0a 28 64 65 66 |ECHO is |t...(def|
|000016a0| 61 6c 69 61 73 20 27 63 | 61 6c 65 6e 64 61 72 2d |alias 'c|alendar-|
|000016b0| 6e 65 78 74 2d 74 7a 6f | 6c 6b 69 6e 2d 64 61 74 |next-tzo|lkin-dat|
|000016c0| 65 20 23 5b 28 74 7a 6f | 6c 6b 69 6e 2d 64 61 74 |e #[(tzo|lkin-dat|
|000016d0| 65 20 26 6f 70 74 69 6f | 6e 61 6c 20 6e 6f 65 63 |e &optio|nal noec|
|000016e0| 68 6f 29 20 22 c0 c1 c2 | 0b c4 20 89 1d 89 1d 41 |ho) "...|.. ....A|
|000016f0| 41 40 29 53 1e 06 0d 1d | c7 0d 21 1e 08 c9 0d 21 |A@)S....|..!....!|
|00001700| 1e 5c 6e cb 0d 21 1e 0c | 0e 5c 6e cd 0e 08 53 5f |.\n..!..|.\n...S_|
|00001710| 5c 5c 1e 0e 0e 08 cf 56 | ab 98 0e 0e d0 d1 0e 08 |\\.....V|........|
|00001720| 5f 5c 5c d2 a5 5a 16 0e | d3 0e 0c 21 ab 85 0e 0e |_\\..Z..|...!....|
|00001730| 54 16 0e 0e 0e 2d 0e 06 | d4 5f 5c 5c 0e 06 d1 a5 |T....-..|._\\....|
|00001740| 5c 5c 0e 06 d5 a5 5b 5c | 5c 0e 06 d6 a5 5c 5c 2a |\\....[\|\....\\*|
|00001750| d7 5c 5c 5c 22 21 21 88 | 0e 18 ae 82 d9 20 87 22 |.\\\"!!.|..... ."|
|00001760| 20 5b 63 61 6c 65 6e 64 | 61 72 2d 67 6f 74 6f 2d | [calend|ar-goto-|
|00001770| 64 61 74 65 20 63 61 6c | 65 6e 64 61 72 2d 67 72 |date cal|endar-gr|
|00001780| 65 67 6f 72 69 61 6e 2d | 66 72 6f 6d 2d 61 62 73 |egorian-|from-abs|
|00001790| 6f 6c 75 74 65 20 63 61 | 6c 65 6e 64 61 72 2d 6d |olute ca|lendar-m|
|000017a0| 61 79 61 6e 2d 74 7a 6f | 6c 6b 69 6e 2d 6f 6e 2d |ayan-tzo|lkin-on-|
|000017b0| 6f 72 2d 62 65 66 6f 72 | 65 20 74 7a 6f 6c 6b 69 |or-befor|e tzolki|
|000017c0| 6e 2d 64 61 74 65 20 63 | 61 6c 65 6e 64 61 72 2d |n-date c|alendar-|
|000017d0| 63 75 72 73 6f 72 2d 74 | 6f 2d 64 61 74 65 20 64 |cursor-t|o-date d|
|000017e0| 61 74 65 20 70 72 69 6f | 72 2d 79 65 61 72 73 20 |ate prio|r-years |
|000017f0| 65 78 74 72 61 63 74 2d | 63 61 6c 65 6e 64 61 72 |extract-|calendar|
|00001800| 2d 6d 6f 6e 74 68 20 6d | 6f 6e 74 68 20 65 78 74 |-month m|onth ext|
|00001810| 72 61 63 74 2d 63 61 6c | 65 6e 64 61 72 2d 64 61 |ract-cal|endar-da|
|00001820| 79 20 64 61 79 20 65 78 | 74 72 61 63 74 2d 63 61 |y day ex|tract-ca|
|00001830| 6c 65 6e 64 61 72 2d 79 | 65 61 72 20 79 65 61 72 |lendar-y|ear year|
|00001840| 20 33 31 20 64 61 79 2d | 6f 66 2d 79 65 61 72 20 | 31 day-|of-year |
|00001850| 32 20 32 33 20 34 20 31 | 30 20 63 61 6c 65 6e 64 |2 23 4 1|0 calend|
|00001860| 61 72 2d 6c 65 61 70 2d | 79 65 61 72 2d 70 20 33 |ar-leap-|year-p 3|
|00001870| 36 35 20 31 30 30 20 34 | 30 30 20 32 36 30 20 6e |65 100 4|00 260 n|
|00001880| 6f 65 63 68 6f 20 63 61 | 6c 65 6e 64 61 72 2d 70 |oecho ca|lendar-p|
|00001890| 72 69 6e 74 2d 6d 61 79 | 61 6e 2d 64 61 74 65 5d |rint-may|an-date]|
|000018a0| 20 39 20 28 23 24 20 2e | 20 35 37 30 32 29 20 28 | 9 (#$ .| 5702) (|
|000018b0| 6c 69 73 74 20 28 63 61 | 6c 65 6e 64 61 72 2d 72 |list (ca|lendar-r|
|000018c0| 65 61 64 2d 6d 61 79 61 | 6e 2d 74 7a 6f 6c 6b 69 |ead-maya|n-tzolki|
|000018d0| 6e 2d 64 61 74 65 29 29 | 5d 29 0a 23 40 39 30 20 |n-date))|]).#@90 |
|000018e0| 4d 6f 76 65 20 63 75 72 | 73 6f 72 20 74 6f 20 70 |Move cur|sor to p|
|000018f0| 72 65 76 69 6f 75 73 20 | 69 6e 73 74 61 6e 63 65 |revious |instance|
|00001900| 20 6f 66 20 4d 61 79 61 | 6e 20 54 5a 4f 4c 4b 49 | of Maya|n TZOLKI|
|00001910| 4e 2d 44 41 54 45 2e 20 | 0a 45 63 68 6f 20 4d 61 |N-DATE. |.Echo Ma|
|00001920| 79 61 6e 20 64 61 74 65 | 20 69 66 20 4e 4f 45 43 |yan date| if NOEC|
|00001930| 48 4f 20 69 73 20 74 2e | 1f 0a 28 64 65 66 61 6c |HO is t.|..(defal|
|00001940| 69 61 73 20 27 63 61 6c | 65 6e 64 61 72 2d 70 72 |ias 'cal|endar-pr|
|00001950| 65 76 69 6f 75 73 2d 74 | 7a 6f 6c 6b 69 6e 2d 64 |evious-t|zolkin-d|
|00001960| 61 74 65 20 23 5b 28 74 | 7a 6f 6c 6b 69 6e 2d 64 |ate #[(t|zolkin-d|
|00001970| 61 74 65 20 26 6f 70 74 | 69 6f 6e 61 6c 20 6e 6f |ate &opt|ional no|
|00001980| 65 63 68 6f 29 20 22 c0 | c1 c2 0b c4 20 1d c6 0d |echo) ".|.... ...|
|00001990| 21 53 1e 07 c8 0d 21 c9 | 0e 07 5f 5c 5c 0e 07 ca |!S....!.|.._\\...|
|000019a0| a5 5c 5c 0e 07 cb a5 5b | 5c 5c 0e 07 cc a5 5c 5c |.\\....[|\\....\\|
|000019b0| 2a 53 5c 22 21 21 88 0e | 0d ae 82 ce 20 87 22 20 |*S\"!!..|.... ." |
|000019c0| 5b 63 61 6c 65 6e 64 61 | 72 2d 67 6f 74 6f 2d 64 |[calenda|r-goto-d|
|000019d0| 61 74 65 20 63 61 6c 65 | 6e 64 61 72 2d 67 72 65 |ate cale|ndar-gre|
|000019e0| 67 6f 72 69 61 6e 2d 66 | 72 6f 6d 2d 61 62 73 6f |gorian-f|rom-abso|
|000019f0| 6c 75 74 65 20 63 61 6c | 65 6e 64 61 72 2d 6d 61 |lute cal|endar-ma|
|00001a00| 79 61 6e 2d 74 7a 6f 6c | 6b 69 6e 2d 6f 6e 2d 6f |yan-tzol|kin-on-o|
|00001a10| 72 2d 62 65 66 6f 72 65 | 20 74 7a 6f 6c 6b 69 6e |r-before| tzolkin|
|00001a20| 2d 64 61 74 65 20 63 61 | 6c 65 6e 64 61 72 2d 63 |-date ca|lendar-c|
|00001a30| 75 72 73 6f 72 2d 74 6f | 2d 64 61 74 65 20 64 61 |ursor-to|-date da|
|00001a40| 74 65 20 65 78 74 72 61 | 63 74 2d 63 61 6c 65 6e |te extra|ct-calen|
|00001a50| 64 61 72 2d 79 65 61 72 | 20 70 72 69 6f 72 2d 79 |dar-year| prior-y|
|00001a60| 65 61 72 73 20 63 61 6c | 65 6e 64 61 72 2d 64 61 |ears cal|endar-da|
|00001a70| 79 2d 6e 75 6d 62 65 72 | 20 33 36 35 20 34 20 31 |y-number| 365 4 1|
|00001a80| 30 30 20 34 30 30 20 6e | 6f 65 63 68 6f 20 63 61 |00 400 n|oecho ca|
|00001a90| 6c 65 6e 64 61 72 2d 70 | 72 69 6e 74 2d 6d 61 79 |lendar-p|rint-may|
|00001aa0| 61 6e 2d 64 61 74 65 5d | 20 37 20 28 23 24 20 2e |an-date]| 7 (#$ .|
|00001ab0| 20 36 33 36 38 29 20 28 | 6c 69 73 74 20 28 63 61 | 6368) (|list (ca|
|00001ac0| 6c 65 6e 64 61 72 2d 72 | 65 61 64 2d 6d 61 79 61 |lendar-r|ead-maya|
|00001ad0| 6e 2d 74 7a 6f 6c 6b 69 | 6e 2d 64 61 74 65 29 29 |n-tzolki|n-date))|
|00001ae0| 5d 29 0a 23 40 37 32 20 | 43 6f 6e 76 65 72 74 20 |]).#@72 |Convert |
|00001af0| 4d 61 79 61 6e 20 74 7a | 6f 6c 6b 69 6e 20 64 61 |Mayan tz|olkin da|
|00001b00| 74 65 20 28 61 20 70 61 | 69 72 29 20 69 6e 74 6f |te (a pa|ir) into|
|00001b10| 20 69 74 73 20 74 72 61 | 64 69 74 69 6f 6e 61 6c | its tra|ditional|
|00001b20| 20 77 72 69 74 74 65 6e | 20 66 6f 72 6d 2e 1f 0a | written| form...|
|00001b30| 28 64 65 66 61 6c 69 61 | 73 20 27 63 61 6c 65 6e |(defalia|s 'calen|
|00001b40| 64 61 72 2d 6d 61 79 61 | 6e 2d 74 7a 6f 6c 6b 69 |dar-maya|n-tzolki|
|00001b50| 6e 2d 74 6f 2d 73 74 72 | 69 6e 67 20 23 5b 28 74 |n-to-str|ing #[(t|
|00001b60| 7a 6f 6c 6b 69 6e 29 20 | 22 c0 c1 5c 6e 40 0b 5c |zolkin) |"..\n@.\|
|00001b70| 6e 41 53 48 23 87 22 20 | 5b 66 6f 72 6d 61 74 20 |nASH#." |[format |
|00001b80| 22 25 64 20 25 73 22 20 | 74 7a 6f 6c 6b 69 6e 20 |"%d %s" |tzolkin |
|00001b90| 63 61 6c 65 6e 64 61 72 | 2d 6d 61 79 61 6e 2d 74 |calendar|-mayan-t|
|00001ba0| 7a 6f 6c 6b 69 6e 2d 6e | 61 6d 65 73 2d 61 72 72 |zolkin-n|ames-arr|
|00001bb0| 61 79 5d 20 35 20 28 23 | 24 20 2e 20 36 38 38 38 |ay] 5 (#|$ . 6888|
|00001bc0| 29 5d 29 0a 23 40 31 35 | 35 20 41 62 73 6f 6c 75 |)]).#@15|5 Absolu|
|00001bd0| 74 65 20 64 61 74 65 20 | 74 68 61 74 20 69 73 20 |te date |that is |
|00001be0| 4d 61 79 61 6e 20 54 5a | 4f 4c 4b 49 4e 2d 44 41 |Mayan TZ|OLKIN-DA|
|00001bf0| 54 45 20 61 6e 64 20 48 | 41 41 42 2d 44 41 54 45 |TE and H|AAB-DATE|
|00001c00| 2e 0a 4c 61 74 65 73 74 | 20 73 75 63 68 20 64 61 |..Latest| such da|
|00001c10| 74 65 20 6f 6e 20 6f 72 | 20 62 65 66 6f 72 65 20 |te on or| before |
|00001c20| 44 41 54 45 2e 0a 52 65 | 74 75 72 6e 73 20 6e 69 |DATE..Re|turns ni|
|00001c30| 6c 20 69 66 20 73 75 63 | 68 20 61 20 74 7a 6f 6c |l if suc|h a tzol|
|00001c40| 6b 69 6e 2d 68 61 61 62 | 20 63 6f 6d 62 69 6e 61 |kin-haab| combina|
|00001c50| 74 69 6f 6e 20 69 73 20 | 69 6d 70 6f 73 73 69 62 |tion is |impossib|
|00001c60| 6c 65 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |le...(de|falias '|
|00001c70| 63 61 6c 65 6e 64 61 72 | 2d 6d 61 79 61 6e 2d 74 |calendar|-mayan-t|
|00001c80| 7a 6f 6c 6b 69 6e 2d 68 | 61 61 62 2d 6f 6e 2d 6f |zolkin-h|aab-on-o|
|00001c90| 72 2d 62 65 66 6f 72 65 | 20 23 5b 28 74 7a 6f 6c |r-before| #[(tzol|
|00001ca0| 6b 69 6e 2d 64 61 74 65 | 20 68 61 61 62 2d 64 61 |kin-date| haab-da|
|00001cb0| 74 65 20 64 61 74 65 29 | 20 22 c0 c1 c2 21 0b 5c |te date)| "...!.\|
|00001cc0| 22 1c c5 c6 c2 21 0e 07 | 5c 22 89 1e 08 0c 5a 89 |"....!..|\"....Z.|
|00001cd0| 1e 09 ca a6 c2 55 ad 8f | 0e 0b cc 0e 0b 0c 0e 09 |.....U..|........|
|00001ce0| cd 5f 5c 5c 5a ce 5c 22 | 5a 2b 87 22 20 5b 63 61 |._\\Z.\"|Z+." [ca|
|00001cf0| 6c 65 6e 64 61 72 2d 6d | 61 79 61 6e 2d 68 61 61 |lendar-m|ayan-haa|
|00001d00| 62 2d 64 69 66 66 65 72 | 65 6e 63 65 20 63 61 6c |b-differ|ence cal|
|00001d10| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 68 61 61 62 |endar-ma|yan-haab|
|00001d20| 2d 66 72 6f 6d 2d 61 62 | 73 6f 6c 75 74 65 20 30 |-from-ab|solute 0|
|00001d30| 20 68 61 61 62 2d 64 61 | 74 65 20 68 61 61 62 2d | haab-da|te haab-|
|00001d40| 64 69 66 66 65 72 65 6e | 63 65 20 63 61 6c 65 6e |differen|ce calen|
|00001d50| 64 61 72 2d 6d 61 79 61 | 6e 2d 74 7a 6f 6c 6b 69 |dar-maya|n-tzolki|
|00001d60| 6e 2d 64 69 66 66 65 72 | 65 6e 63 65 20 63 61 6c |n-differ|ence cal|
|00001d70| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 74 7a 6f 6c |endar-ma|yan-tzol|
|00001d80| 6b 69 6e 2d 66 72 6f 6d | 2d 61 62 73 6f 6c 75 74 |kin-from|-absolut|
|00001d90| 65 20 74 7a 6f 6c 6b 69 | 6e 2d 64 61 74 65 20 74 |e tzolki|n-date t|
|00001da0| 7a 6f 6c 6b 69 6e 2d 64 | 69 66 66 65 72 65 6e 63 |zolkin-d|ifferenc|
|00001db0| 65 20 64 69 66 66 65 72 | 65 6e 63 65 20 35 20 64 |e differ|ence 5 d|
|00001dc0| 61 74 65 20 6d 6f 64 20 | 33 36 35 20 31 38 39 38 |ate mod |365 1898|
|00001dd0| 30 5d 20 37 20 28 23 24 | 20 2e 20 37 31 31 34 29 |0] 7 (#$| . 7114)|
|00001de0| 5d 29 0a 23 40 33 30 20 | 50 72 6f 6d 70 74 20 66 |]).#@30 |Prompt f|
|00001df0| 6f 72 20 61 20 4d 61 79 | 61 6e 20 68 61 61 62 20 |or a May|an haab |
|00001e00| 64 61 74 65 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |date..(d|efalias |
|00001e10| 27 63 61 6c 65 6e 64 61 | 72 2d 72 65 61 64 2d 6d |'calenda|r-read-m|
|00001e20| 61 79 61 6e 2d 68 61 61 | 62 2d 64 61 74 65 20 23 |ayan-haa|b-date #|
|00001e30| 5b 6e 69 6c 20 22 c0 19 | c2 c3 c4 5c 22 1d c6 0e |[nil "..|...\"...|
|00001e40| 07 0d c8 57 ad 81 c9 5c | 22 1e 5c 6e cb cc cd ce |...W...\|".\n....|
|00001e50| cf d0 0e 5c 6e 5c 22 d1 | c0 24 21 d2 0e 5c 6e d3 |...\n\".|.$!..\n.|
|00001e60| cc 23 5c 22 41 1e 14 0d | 0e 14 2c 42 87 22 20 5b |.#\"A...|..,B." [|
|00001e70| 74 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 2d 69 67 6e |t comple|tion-ign|
|00001e80| 6f 72 65 2d 63 61 73 65 | 20 63 61 6c 65 6e 64 61 |ore-case| calenda|
|00001e90| 72 2d 72 65 61 64 20 22 | 48 61 61 62 20 6b 69 6e |r-read "|Haab kin|
|00001ea0| 20 28 30 2d 31 39 29 3a | 20 22 20 28 6c 61 6d 62 | (0-19):| " (lamb|
|00001eb0| 64 61 20 28 78 29 20 28 | 61 6e 64 20 28 3e 3d 20 |da (x) (|and (>= |
|00001ec0| 78 20 30 29 20 28 3c 20 | 78 20 32 30 29 29 29 20 |x 0) (< |x 20))) |
|00001ed0| 68 61 61 62 2d 64 61 79 | 20 61 70 70 65 6e 64 20 |haab-day| append |
|00001ee0| 63 61 6c 65 6e 64 61 72 | 2d 6d 61 79 61 6e 2d 68 |calendar|-mayan-h|
|00001ef0| 61 61 62 2d 6d 6f 6e 74 | 68 2d 6e 61 6d 65 2d 61 |aab-mont|h-name-a|
|00001f00| 72 72 61 79 20 35 20 28 | 22 55 61 79 65 62 22 29 |rray 5 (|"Uayeb")|
|00001f10| 20 68 61 61 62 2d 6d 6f | 6e 74 68 2d 6c 69 73 74 | haab-mo|nth-list|
|00001f20| 20 61 73 73 6f 63 20 63 | 61 70 69 74 61 6c 69 7a | assoc c|apitaliz|
|00001f30| 65 20 63 6f 6d 70 6c 65 | 74 69 6e 67 2d 72 65 61 |e comple|ting-rea|
|00001f40| 64 20 22 48 61 61 62 20 | 75 69 6e 61 6c 3a 20 22 |d "Haab |uinal: "|
|00001f50| 20 6d 61 70 63 61 72 20 | 6c 69 73 74 20 6e 69 6c | mapcar |list nil|
|00001f60| 20 63 61 6c 65 6e 64 61 | 72 2d 6d 61 6b 65 2d 61 | calenda|r-make-a|
|00001f70| 6c 69 73 74 20 31 20 68 | 61 61 62 2d 6d 6f 6e 74 |list 1 h|aab-mont|
|00001f80| 68 5d 20 37 20 28 23 24 | 20 2e 20 37 36 35 36 29 |h] 7 (#$| . 7656)|
|00001f90| 5d 29 0a 23 40 33 33 20 | 50 72 6f 6d 70 74 20 66 |]).#@33 |Prompt f|
|00001fa0| 6f 72 20 61 20 4d 61 79 | 61 6e 20 74 7a 6f 6c 6b |or a May|an tzolk|
|00001fb0| 69 6e 20 64 61 74 65 1f | 0a 28 64 65 66 61 6c 69 |in date.|.(defali|
|00001fc0| 61 73 20 27 63 61 6c 65 | 6e 64 61 72 2d 72 65 61 |as 'cale|ndar-rea|
|00001fd0| 64 2d 6d 61 79 61 6e 2d | 74 7a 6f 6c 6b 69 6e 2d |d-mayan-|tzolkin-|
|00001fe0| 64 61 74 65 20 23 5b 6e | 69 6c 20 22 c0 19 c2 c3 |date #[n|il "....|
|00001ff0| c4 5c 22 1d c6 0e 07 c8 | 5c 22 1e 09 ca cb cc cd |.\".....|\"......|
|00002000| ce cf 0e 09 5c 22 c8 c0 | 24 21 d0 0e 09 d1 cb 23 |....\"..|$!.....#|
|00002010| 5c 22 41 1e 12 0d 0e 12 | 2c 42 87 22 20 5b 74 20 |\"A.....|,B." [t |
|00002020| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2d 69 67 6e 6f 72 |completi|on-ignor|
|00002030| 65 2d 63 61 73 65 20 63 | 61 6c 65 6e 64 61 72 2d |e-case c|alendar-|
|00002040| 72 65 61 64 20 22 54 7a | 6f 6c 6b 69 6e 20 6b 69 |read "Tz|olkin ki|
|00002050| 6e 20 28 31 2d 31 33 29 | 3a 20 22 20 28 6c 61 6d |n (1-13)|: " (lam|
|00002060| 62 64 61 20 28 78 29 20 | 28 61 6e 64 20 28 3e 20 |bda (x) |(and (> |
|00002070| 78 20 30 29 20 28 3c 20 | 78 20 31 34 29 29 29 20 |x 0) (< |x 14))) |
|00002080| 74 7a 6f 6c 6b 69 6e 2d | 63 6f 75 6e 74 20 61 70 |tzolkin-|count ap|
|00002090| 70 65 6e 64 20 63 61 6c | 65 6e 64 61 72 2d 6d 61 |pend cal|endar-ma|
|000020a0| 79 61 6e 2d 74 7a 6f 6c | 6b 69 6e 2d 6e 61 6d 65 |yan-tzol|kin-name|
|000020b0| 73 2d 61 72 72 61 79 20 | 6e 69 6c 20 74 7a 6f 6c |s-array |nil tzol|
|000020c0| 6b 69 6e 2d 6e 61 6d 65 | 2d 6c 69 73 74 20 61 73 |kin-name|-list as|
|000020d0| 73 6f 63 20 63 61 70 69 | 74 61 6c 69 7a 65 20 63 |soc capi|talize c|
|000020e0| 6f 6d 70 6c 65 74 69 6e | 67 2d 72 65 61 64 20 22 |ompletin|g-read "|
|000020f0| 54 7a 6f 6c 6b 69 6e 20 | 75 69 6e 61 6c 3a 20 22 |Tzolkin |uinal: "|
|00002100| 20 6d 61 70 63 61 72 20 | 6c 69 73 74 20 63 61 6c | mapcar |list cal|
|00002110| 65 6e 64 61 72 2d 6d 61 | 6b 65 2d 61 6c 69 73 74 |endar-ma|ke-alist|
|00002120| 20 31 20 74 7a 6f 6c 6b | 69 6e 2d 6e 61 6d 65 5d | 1 tzolk|in-name]|
|00002130| 20 37 20 28 23 24 20 2e | 20 38 30 38 38 29 5d 29 | 7 (#$ .| 8088)])|
|00002140| 0a 23 40 31 30 37 20 4d | 6f 76 65 20 63 75 72 73 |.#@107 M|ove curs|
|00002150| 6f 72 20 74 6f 20 6e 65 | 78 74 20 69 6e 73 74 61 |or to ne|xt insta|
|00002160| 6e 63 65 20 6f 66 20 4d | 61 79 61 6e 20 48 41 41 |nce of M|ayan HAA|
|00002170| 42 2d 44 41 54 45 20 54 | 5a 4f 4b 4c 49 4e 2d 44 |B-DATE T|ZOKLIN-D|
|00002180| 41 54 45 20 63 6f 6d 62 | 69 6e 61 74 69 6f 6e 2e |ATE comb|ination.|
|00002190| 0a 45 63 68 6f 20 4d 61 | 79 61 6e 20 64 61 74 65 |.Echo Ma|yan date|
|000021a0| 20 69 66 20 4e 4f 45 43 | 48 4f 20 69 73 20 74 2e | if NOEC|HO is t.|
|000021b0| 1f 0a 28 64 65 66 61 6c | 69 61 73 20 27 63 61 6c |..(defal|ias 'cal|
|000021c0| 65 6e 64 61 72 2d 6e 65 | 78 74 2d 63 61 6c 65 6e |endar-ne|xt-calen|
|000021d0| 64 61 72 2d 72 6f 75 6e | 64 2d 64 61 74 65 20 23 |dar-roun|d-date #|
|000021e0| 5b 28 74 7a 6f 6c 6b 69 | 6e 2d 64 61 74 65 20 68 |[(tzolki|n-date h|
|000021f0| 61 61 62 2d 64 61 74 65 | 20 26 6f 70 74 69 6f 6e |aab-date| &option|
|00002200| 61 6c 20 6e 6f 65 63 68 | 6f 29 20 22 c0 09 5c 6e |al noech|o) "..\n|
|00002210| c3 20 89 1c 89 1c 41 41 | 40 29 53 1d 0c 1c c6 0c |. ....AA|@)S.....|
|00002220| 21 1e 07 c8 0c 21 1e 09 | ca 0c 21 1e 0b 0e 09 cc |!....!..|..!.....|
|00002230| 0e 07 53 5f 5c 5c 1e 0d | 0e 07 ce 56 ab 98 0e 0d |..S_\\..|...V....|
|00002240| cf d0 0e 07 5f 5c 5c d1 | a5 5a 16 0d d2 0e 0b 21 |...._\\.|.Z.....!|
|00002250| ab 85 0e 0d 54 16 0d 0e | 0d 2d 0d d3 5f 5c 5c 0d |....T...|.-.._\\.|
|00002260| d0 a5 5c 5c 0d d4 a5 5b | 5c 5c 0d d5 a5 5c 5c 2a |..\\...[|\\...\\*|
|00002270| d6 5c 5c 23 89 1c ac 8b | d7 d8 d9 09 21 da 5c 6e |.\\#....|....!.\n|
|00002280| 21 23 aa 8c db dc 0c 21 | 21 88 0e 1d ae 82 de 20 |!#.....!|!...... |
|00002290| 29 87 22 20 5b 63 61 6c | 65 6e 64 61 72 2d 6d 61 |)." [cal|endar-ma|
|000022a0| 79 61 6e 2d 74 7a 6f 6c | 6b 69 6e 2d 68 61 61 62 |yan-tzol|kin-haab|
|000022b0| 2d 6f 6e 2d 6f 72 2d 62 | 65 66 6f 72 65 20 74 7a |-on-or-b|efore tz|
|000022c0| 6f 6c 6b 69 6e 2d 64 61 | 74 65 20 68 61 61 62 2d |olkin-da|te haab-|
|000022d0| 64 61 74 65 20 63 61 6c | 65 6e 64 61 72 2d 63 75 |date cal|endar-cu|
|000022e0| 72 73 6f 72 2d 74 6f 2d | 64 61 74 65 20 64 61 74 |rsor-to-|date dat|
|000022f0| 65 20 70 72 69 6f 72 2d | 79 65 61 72 73 20 65 78 |e prior-|years ex|
|00002300| 74 72 61 63 74 2d 63 61 | 6c 65 6e 64 61 72 2d 6d |tract-ca|lendar-m|
|00002310| 6f 6e 74 68 20 6d 6f 6e | 74 68 20 65 78 74 72 61 |onth mon|th extra|
|00002320| 63 74 2d 63 61 6c 65 6e | 64 61 72 2d 64 61 79 20 |ct-calen|dar-day |
|00002330| 64 61 79 20 65 78 74 72 | 61 63 74 2d 63 61 6c 65 |day extr|act-cale|
|00002340| 6e 64 61 72 2d 79 65 61 | 72 20 79 65 61 72 20 33 |ndar-yea|r year 3|
|00002350| 31 20 64 61 79 2d 6f 66 | 2d 79 65 61 72 20 32 20 |1 day-of|-year 2 |
|00002360| 32 33 20 34 20 31 30 20 | 63 61 6c 65 6e 64 61 72 |23 4 10 |calendar|
|00002370| 2d 6c 65 61 70 2d 79 65 | 61 72 2d 70 20 33 36 35 |-leap-ye|ar-p 365|
|00002380| 20 31 30 30 20 34 30 30 | 20 31 38 39 38 30 20 65 | 100 400| 18980 e|
|00002390| 72 72 6f 72 20 22 25 73 | 2c 20 25 73 20 64 6f 65 |rror "%s|, %s doe|
|000023a0| 73 20 6e 6f 74 20 65 78 | 69 73 74 20 69 6e 20 74 |s not ex|ist in t|
|000023b0| 68 65 20 4d 61 79 61 6e | 20 63 61 6c 65 6e 64 61 |he Mayan| calenda|
|000023c0| 72 20 72 6f 75 6e 64 22 | 20 63 61 6c 65 6e 64 61 |r round"| calenda|
|000023d0| 72 2d 6d 61 79 61 6e 2d | 74 7a 6f 6c 6b 69 6e 2d |r-mayan-|tzolkin-|
|000023e0| 74 6f 2d 73 74 72 69 6e | 67 20 63 61 6c 65 6e 64 |to-strin|g calend|
|000023f0| 61 72 2d 6d 61 79 61 6e | 2d 68 61 61 62 2d 74 6f |ar-mayan|-haab-to|
|00002400| 2d 73 74 72 69 6e 67 20 | 63 61 6c 65 6e 64 61 72 |-string |calendar|
|00002410| 2d 67 6f 74 6f 2d 64 61 | 74 65 20 63 61 6c 65 6e |-goto-da|te calen|
|00002420| 64 61 72 2d 67 72 65 67 | 6f 72 69 61 6e 2d 66 72 |dar-greg|orian-fr|
|00002430| 6f 6d 2d 61 62 73 6f 6c | 75 74 65 20 6e 6f 65 63 |om-absol|ute noec|
|00002440| 68 6f 20 63 61 6c 65 6e | 64 61 72 2d 70 72 69 6e |ho calen|dar-prin|
|00002450| 74 2d 6d 61 79 61 6e 2d | 64 61 74 65 5d 20 38 20 |t-mayan-|date] 8 |
|00002460| 28 23 24 20 2e 20 38 35 | 31 39 29 20 28 6c 69 73 |(#$ . 85|19) (lis|
|00002470| 74 20 28 63 61 6c 65 6e | 64 61 72 2d 72 65 61 64 |t (calen|dar-read|
|00002480| 2d 6d 61 79 61 6e 2d 74 | 7a 6f 6c 6b 69 6e 2d 64 |-mayan-t|zolkin-d|
|00002490| 61 74 65 29 20 28 63 61 | 6c 65 6e 64 61 72 2d 72 |ate) (ca|lendar-r|
|000024a0| 65 61 64 2d 6d 61 79 61 | 6e 2d 68 61 61 62 2d 64 |ead-maya|n-haab-d|
|000024b0| 61 74 65 29 29 5d 29 0a | 23 40 31 30 34 20 4d 6f |ate))]).|#@104 Mo|
|000024c0| 76 65 20 74 6f 20 70 72 | 65 76 69 6f 75 73 20 69 |ve to pr|evious i|
|000024d0| 6e 73 74 61 6e 63 65 20 | 6f 66 20 4d 61 79 61 6e |nstance |of Mayan|
|000024e0| 20 54 5a 4f 4b 4c 49 4e | 2d 44 41 54 45 20 48 41 | TZOKLIN|-DATE HA|
|000024f0| 41 42 2d 44 41 54 45 20 | 63 6f 6d 62 69 6e 61 74 |AB-DATE |combinat|
|00002500| 69 6f 6e 2e 0a 45 63 68 | 6f 20 4d 61 79 61 6e 20 |ion..Ech|o Mayan |
|00002510| 64 61 74 65 20 69 66 20 | 4e 4f 45 43 48 4f 20 69 |date if |NOECHO i|
|00002520| 73 20 74 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |s t...(d|efalias |
|00002530| 27 63 61 6c 65 6e 64 61 | 72 2d 70 72 65 76 69 6f |'calenda|r-previo|
|00002540| 75 73 2d 63 61 6c 65 6e | 64 61 72 2d 72 6f 75 6e |us-calen|dar-roun|
|00002550| 64 2d 64 61 74 65 20 23 | 5b 28 74 7a 6f 6c 6b 69 |d-date #|[(tzolki|
|00002560| 6e 2d 64 61 74 65 20 68 | 61 61 62 2d 64 61 74 65 |n-date h|aab-date|
|00002570| 20 26 6f 70 74 69 6f 6e | 61 6c 20 6e 6f 65 63 68 | &option|al noech|
|00002580| 6f 29 20 22 c0 09 5c 6e | c3 20 1c c5 0c 21 53 1e |o) "..\n|. ...!S.|
|00002590| 06 c7 0c 21 c8 0e 06 5f | 5c 5c 0e 06 c9 a5 5c 5c |...!..._|\\....\\|
|000025a0| 0e 06 ca a5 5b 5c 5c 0e | 06 cb a5 5c 5c 2a 53 23 |....[\\.|...\\*S#|
|000025b0| 89 1c ac 8b cc cd ce 09 | 21 cf 5c 6e 21 23 aa 8c |........|!.\n!#..|
|000025c0| d0 d1 0c 21 21 88 0e 12 | ae 82 d3 20 29 87 22 20 |...!!...|... )." |
|000025d0| 5b 63 61 6c 65 6e 64 61 | 72 2d 6d 61 79 61 6e 2d |[calenda|r-mayan-|
|000025e0| 74 7a 6f 6c 6b 69 6e 2d | 68 61 61 62 2d 6f 6e 2d |tzolkin-|haab-on-|
|000025f0| 6f 72 2d 62 65 66 6f 72 | 65 20 74 7a 6f 6c 6b 69 |or-befor|e tzolki|
|00002600| 6e 2d 64 61 74 65 20 68 | 61 61 62 2d 64 61 74 65 |n-date h|aab-date|
|00002610| 20 63 61 6c 65 6e 64 61 | 72 2d 63 75 72 73 6f 72 | calenda|r-cursor|
|00002620| 2d 74 6f 2d 64 61 74 65 | 20 64 61 74 65 20 65 78 |-to-date| date ex|
|00002630| 74 72 61 63 74 2d 63 61 | 6c 65 6e 64 61 72 2d 79 |tract-ca|lendar-y|
|00002640| 65 61 72 20 70 72 69 6f | 72 2d 79 65 61 72 73 20 |ear prio|r-years |
|00002650| 63 61 6c 65 6e 64 61 72 | 2d 64 61 79 2d 6e 75 6d |calendar|-day-num|
|00002660| 62 65 72 20 33 36 35 20 | 34 20 31 30 30 20 34 30 |ber 365 |4 100 40|
|00002670| 30 20 65 72 72 6f 72 20 | 22 25 73 2c 20 25 73 20 |0 error |"%s, %s |
|00002680| 64 6f 65 73 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |does not| exist i|
|00002690| 6e 20 74 68 65 20 4d 61 | 79 61 6e 20 63 61 6c 65 |n the Ma|yan cale|
|000026a0| 6e 64 61 72 20 72 6f 75 | 6e 64 22 20 63 61 6c 65 |ndar rou|nd" cale|
|000026b0| 6e 64 61 72 2d 6d 61 79 | 61 6e 2d 74 7a 6f 6c 6b |ndar-may|an-tzolk|
|000026c0| 69 6e 2d 74 6f 2d 73 74 | 72 69 6e 67 20 63 61 6c |in-to-st|ring cal|
|000026d0| 65 6e 64 61 72 2d 6d 61 | 79 61 6e 2d 68 61 61 62 |endar-ma|yan-haab|
|000026e0| 2d 74 6f 2d 73 74 72 69 | 6e 67 20 63 61 6c 65 6e |-to-stri|ng calen|
|000026f0| 64 61 72 2d 67 6f 74 6f | 2d 64 61 74 65 20 63 61 |dar-goto|-date ca|
|00002700| 6c 65 6e 64 61 72 2d 67 | 72 65 67 6f 72 69 61 6e |lendar-g|regorian|
|00002710| 2d 66 72 6f 6d 2d 61 62 | 73 6f 6c 75 74 65 20 6e |-from-ab|solute n|
|00002720| 6f 65 63 68 6f 20 63 61 | 6c 65 6e 64 61 72 2d 70 |oecho ca|lendar-p|
|00002730| 72 69 6e 74 2d 6d 61 79 | 61 6e 2d 64 61 74 65 5d |rint-may|an-date]|
|00002740| 20 37 20 28 23 24 20 2e | 20 39 34 30 36 29 20 28 | 7 (#$ .| 9406) (|
|00002750| 6c 69 73 74 20 28 63 61 | 6c 65 6e 64 61 72 2d 72 |list (ca|lendar-r|
|00002760| 65 61 64 2d 6d 61 79 61 | 6e 2d 74 7a 6f 6c 6b 69 |ead-maya|n-tzolki|
|00002770| 6e 2d 64 61 74 65 29 20 | 28 63 61 6c 65 6e 64 61 |n-date) |(calenda|
|00002780| 72 2d 72 65 61 64 2d 6d | 61 79 61 6e 2d 68 61 61 |r-read-m|ayan-haa|
|00002790| 62 2d 64 61 74 65 29 29 | 5d 29 0a 23 40 31 31 38 |b-date))|]).#@118|
|000027a0| 20 43 6f 6d 70 75 74 65 | 20 74 68 65 20 61 62 73 | Compute| the abs|
|000027b0| 6f 6c 75 74 65 20 64 61 | 74 65 20 63 6f 72 72 65 |olute da|te corre|
|000027c0| 73 70 6f 6e 64 69 6e 67 | 20 74 6f 20 74 68 65 20 |sponding| to the |
|000027d0| 4d 61 79 61 6e 20 4c 6f | 6e 67 20 43 6f 75 6e 74 |Mayan Lo|ng Count|
|000027e0| 20 43 2e 0a 4c 6f 6e 67 | 20 63 6f 75 6e 74 20 69 | C..Long| count i|
|000027f0| 73 20 61 20 6c 69 73 74 | 20 28 62 61 6b 74 75 6e |s a list| (baktun|
|00002800| 20 6b 61 74 75 6e 20 74 | 75 6e 20 75 69 6e 61 6c | katun t|un uinal|
|00002810| 20 6b 69 6e 29 1f 0a 28 | 64 65 66 61 6c 69 61 73 | kin)..(|defalias|
|00002820| 20 27 63 61 6c 65 6e 64 | 61 72 2d 61 62 73 6f 6c | 'calend|ar-absol|
|00002830| 75 74 65 2d 66 72 6f 6d | 2d 6d 61 79 61 6e 2d 6c |ute-from|-mayan-l|
|00002840| 6f 6e 67 2d 63 6f 75 6e | 74 20 23 5b 28 63 29 20 |ong-coun|t #[(c) |
|00002850| 22 08 40 c1 5f 08 41 40 | c2 5f 5c 5c c3 08 38 c4 |".@._.A@|._\\..8.|
|00002860| 5f 5c 5c c5 08 38 c6 5f | 5c 5c c7 08 38 5c 5c 0e |_\\..8._|\\..8\\.|
|00002870| 08 5b 5c 5c 87 22 20 5b | 63 20 31 34 34 30 30 30 |.[\\." [|c 144000|
|00002880| 20 37 32 30 30 20 32 20 | 33 36 30 20 33 20 32 30 | 7200 2 |360 3 20|
|00002890| 20 34 20 63 61 6c 65 6e | 64 61 72 2d 6d 61 79 61 | 4 calen|dar-maya|
|000028a0| 6e 2d 64 61 79 73 2d 62 | 65 66 6f 72 65 2d 61 62 |n-days-b|efore-ab|
|000028b0| 73 6f 6c 75 74 65 2d 7a | 65 72 6f 5d 20 33 20 28 |solute-z|ero] 3 (|
|000028c0| 23 24 20 2e 20 31 30 31 | 34 35 29 5d 29 0a 23 40 |#$ . 101|45)]).#@|
|000028d0| 38 38 20 53 74 72 69 6e | 67 20 6f 66 20 4d 61 79 |88 Strin|g of May|
|000028e0| 61 6e 20 64 61 74 65 20 | 6f 66 20 47 72 65 67 6f |an date |of Grego|
|000028f0| 72 69 61 6e 20 44 41 54 | 45 2e 0a 44 65 66 61 75 |rian DAT|E..Defau|
|00002900| 6c 74 73 20 74 6f 20 74 | 6f 64 61 79 27 73 20 64 |lts to t|oday's d|
|00002910| 61 74 65 20 69 66 20 44 | 41 54 45 20 69 73 20 6e |ate if D|ATE is n|
|00002920| 6f 74 20 67 69 76 65 6e | 2e 1f 0a 28 64 65 66 61 |ot given|...(defa|
|00002930| 6c 69 61 73 20 27 63 61 | 6c 65 6e 64 61 72 2d 6d |lias 'ca|lendar-m|
|00002940| 61 79 61 6e 2d 64 61 74 | 65 2d 73 74 72 69 6e 67 |ayan-dat|e-string|
|00002950| 20 23 5b 28 26 6f 70 74 | 69 6f 6e 61 6c 20 64 61 | #[(&opt|ional da|
|00002960| 74 65 29 20 22 08 ae 82 | c1 20 18 c2 08 21 53 1b |te) "...|. ...!S.|
|00002970| c4 08 21 c5 0b 5f 5c 5c | 0b c6 a5 5c 5c 0b c7 a5 |..!.._\\|...\\...|
|00002980| 5b 5c 5c 0b c8 a5 5c 5c | 2a 1e 09 ca 0e 09 21 1e |[\\...\\|*.....!.|
|00002990| 0b cc 0e 09 21 1e 0d ce | 0e 09 21 1e 0f d0 d1 d2 |....!...|..!.....|
|000029a0| 0e 0f 21 d3 0e 0b 21 d4 | 0e 0d 21 24 2c 87 22 20 |..!...!.|..!$,." |
|000029b0| 5b 64 61 74 65 20 63 61 | 6c 65 6e 64 61 72 2d 63 |[date ca|lendar-c|
|000029c0| 75 72 72 65 6e 74 2d 64 | 61 74 65 20 65 78 74 72 |urrent-d|ate extr|
|000029d0| 61 63 74 2d 63 61 6c 65 | 6e 64 61 72 2d 79 65 61 |act-cale|ndar-yea|
|000029e0| 72 20 70 72 69 6f 72 2d | 79 65 61 72 73 20 63 61 |r prior-|years ca|
|000029f0| 6c 65 6e 64 61 72 2d 64 | 61 79 2d 6e 75 6d 62 65 |lendar-d|ay-numbe|
|00002a00| 72 20 33 36 35 20 34 20 | 31 30 30 20 34 30 30 20 |r 365 4 |100 400 |
|00002a10| 64 20 63 61 6c 65 6e 64 | 61 72 2d 6d 61 79 61 6e |d calend|ar-mayan|
|00002a20| 2d 74 7a 6f 6c 6b 69 6e | 2d 66 72 6f 6d 2d 61 62 |-tzolkin|-from-ab|
|00002a30| 73 6f 6c 75 74 65 20 74 | 7a 6f 6c 6b 69 6e 20 63 |solute t|zolkin c|
|00002a40| 61 6c 65 6e 64 61 72 2d | 6d 61 79 61 6e 2d 68 61 |alendar-|mayan-ha|
|00002a50| 61 62 2d 66 72 6f 6d 2d | 61 62 73 6f 6c 75 74 65 |ab-from-|absolute|
|00002a60| 20 68 61 61 62 20 63 61 | 6c 65 6e 64 61 72 2d 6d | haab ca|lendar-m|
|00002a70| 61 79 61 6e 2d 6c 6f 6e | 67 2d 63 6f 75 6e 74 2d |ayan-lon|g-count-|
|00002a80| 66 72 6f 6d 2d 61 62 73 | 6f 6c 75 74 65 20 6c 6f |from-abs|olute lo|
|00002a90| 6e 67 2d 63 6f 75 6e 74 | 20 66 6f 72 6d 61 74 20 |ng-count| format |
|00002aa0| 22 4c 6f 6e 67 20 63 6f | 75 6e 74 20 3d 20 25 73 |"Long co|unt = %s|
|00002ab0| 3b 20 74 7a 6f 6c 6b 69 | 6e 20 3d 20 25 73 3b 20 |; tzolki|n = %s; |
|00002ac0| 68 61 61 62 20 3d 20 25 | 73 22 20 63 61 6c 65 6e |haab = %|s" calen|
|00002ad0| 64 61 72 2d 6d 61 79 61 | 6e 2d 6c 6f 6e 67 2d 63 |dar-maya|n-long-c|
|00002ae0| 6f 75 6e 74 2d 74 6f 2d | 73 74 72 69 6e 67 20 63 |ount-to-|string c|
|00002af0| 61 6c 65 6e 64 61 72 2d | 6d 61 79 61 6e 2d 74 7a |alendar-|mayan-tz|
|00002b00| 6f 6c 6b 69 6e 2d 74 6f | 2d 73 74 72 69 6e 67 20 |olkin-to|-string |
|00002b10| 63 61 6c 65 6e 64 61 72 | 2d 6d 61 79 61 6e 2d 68 |calendar|-mayan-h|
|00002b20| 61 61 62 2d 74 6f 2d 73 | 74 72 69 6e 67 5d 20 36 |aab-to-s|tring] 6|
|00002b30| 20 28 23 24 20 2e 20 31 | 30 34 35 31 29 5d 29 0a | (#$ . 1|0451)]).|
|00002b40| 23 40 36 37 20 53 68 6f | 77 20 74 68 65 20 4d 61 |#@67 Sho|w the Ma|
|00002b50| 79 61 6e 20 6c 6f 6e 67 | 20 63 6f 75 6e 74 2c 20 |yan long| count, |
|00002b60| 74 7a 6f 6c 6b 69 6e 2c | 20 61 6e 64 20 68 61 61 |tzolkin,| and haa|
|00002b70| 62 20 65 71 75 69 76 61 | 6c 65 6e 74 73 20 6f 66 |b equiva|lents of|
|00002b80| 20 64 61 74 65 2e 1f 0a | 28 64 65 66 61 6c 69 61 | date...|(defalia|
|00002b90| 73 20 27 63 61 6c 65 6e | 64 61 72 2d 70 72 69 6e |s 'calen|dar-prin|
|00002ba0| 74 2d 6d 61 79 61 6e 2d | 64 61 74 65 20 23 5b 6e |t-mayan-|date #[n|
|00002bb0| 69 6c 20 22 c0 c1 c2 c3 | c4 21 21 5c 22 87 22 20 |il "....|.!!\"." |
|00002bc0| 5b 6d 65 73 73 61 67 65 | 20 22 4d 61 79 61 6e 20 |[message| "Mayan |
|00002bd0| 64 61 74 65 3a 20 25 73 | 22 20 63 61 6c 65 6e 64 |date: %s|" calend|
|00002be0| 61 72 2d 6d 61 79 61 6e | 2d 64 61 74 65 2d 73 74 |ar-mayan|-date-st|
|00002bf0| 72 69 6e 67 20 63 61 6c | 65 6e 64 61 72 2d 63 75 |ring cal|endar-cu|
|00002c00| 72 73 6f 72 2d 74 6f 2d | 64 61 74 65 20 74 5d 20 |rsor-to-|date t] |
|00002c10| 35 20 28 23 24 20 2e 20 | 31 31 30 37 37 29 20 6e |5 (#$ . |11077) n|
|00002c20| 69 6c 5d 29 0a 23 40 37 | 36 20 4d 6f 76 65 20 63 |il]).#@7|6 Move c|
|00002c30| 75 72 73 6f 72 20 74 6f | 20 4d 61 79 61 6e 20 6c |ursor to| Mayan l|
|00002c40| 6f 6e 67 20 63 6f 75 6e | 74 20 44 41 54 45 2e 20 |ong coun|t DATE. |
|00002c50| 20 45 63 68 6f 20 4d 61 | 79 61 6e 20 64 61 74 65 | Echo Ma|yan date|
|00002c60| 20 75 6e 6c 65 73 73 20 | 4e 4f 45 43 48 4f 20 69 | unless |NOECHO i|
|00002c70| 73 20 74 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |s t...(d|efalias |
|00002c80| 27 63 61 6c 65 6e 64 61 | 72 2d 67 6f 74 6f 2d 6d |'calenda|r-goto-m|
|00002c90| 61 79 61 6e 2d 6c 6f 6e | 67 2d 63 6f 75 6e 74 2d |ayan-lon|g-count-|
|00002ca0| 64 61 74 65 20 23 5b 28 | 64 61 74 65 20 26 6f 70 |date #[(|date &op|
|00002cb0| 74 69 6f 6e 61 6c 20 6e | 6f 65 63 68 6f 29 20 22 |tional n|oecho) "|
|00002cc0| c0 c1 c2 0b 21 21 21 88 | 0c ae 82 c5 20 87 22 20 |....!!!.|.... ." |
|00002cd0| 5b 63 61 6c 65 6e 64 61 | 72 2d 67 6f 74 6f 2d 64 |[calenda|r-goto-d|
|00002ce0| 61 74 65 20 63 61 6c 65 | 6e 64 61 72 2d 67 72 65 |ate cale|ndar-gre|
|00002cf0| 67 6f 72 69 61 6e 2d 66 | 72 6f 6d 2d 61 62 73 6f |gorian-f|rom-abso|
|00002d00| 6c 75 74 65 20 63 61 6c | 65 6e 64 61 72 2d 61 62 |lute cal|endar-ab|
|00002d10| 73 6f 6c 75 74 65 2d 66 | 72 6f 6d 2d 6d 61 79 61 |solute-f|rom-maya|
|00002d20| 6e 2d 6c 6f 6e 67 2d 63 | 6f 75 6e 74 20 64 61 74 |n-long-c|ount dat|
|00002d30| 65 20 6e 6f 65 63 68 6f | 20 63 61 6c 65 6e 64 61 |e noecho| calenda|
|00002d40| 72 2d 70 72 69 6e 74 2d | 6d 61 79 61 6e 2d 64 61 |r-print-|mayan-da|
|00002d50| 74 65 5d 20 34 20 28 23 | 24 20 2e 20 31 31 33 30 |te] 4 (#|$ . 1130|
|00002d60| 36 29 20 28 6c 65 74 20 | 28 6c 63 29 20 28 77 68 |6) (let |(lc) (wh|
|00002d70| 69 6c 65 20 28 6e 6f 74 | 20 6c 63 29 20 28 6c 65 |ile (not| lc) (le|
|00002d80| 74 20 28 28 64 61 74 75 | 6d 20 28 63 61 6c 65 6e |t ((datu|m (calen|
|00002d90| 64 61 72 2d 73 74 72 69 | 6e 67 2d 74 6f 2d 6d 61 |dar-stri|ng-to-ma|
|00002da0| 79 61 6e 2d 6c 6f 6e 67 | 2d 63 6f 75 6e 74 20 28 |yan-long|-count (|
|00002db0| 72 65 61 64 2d 73 74 72 | 69 6e 67 20 22 4d 61 79 |read-str|ing "May|
|00002dc0| 61 6e 20 6c 6f 6e 67 20 | 63 6f 75 6e 74 20 28 62 |an long |count (b|
|00002dd0| 61 6b 74 75 6e 2e 6b 61 | 74 75 6e 2e 74 75 6e 2e |aktun.ka|tun.tun.|
|00002de0| 75 69 6e 61 6c 2e 6b 69 | 6e 29 3a 20 22 20 28 63 |uinal.ki|n): " (c|
|00002df0| 61 6c 65 6e 64 61 72 2d | 6d 61 79 61 6e 2d 6c 6f |alendar-|mayan-lo|
|00002e00| 6e 67 2d 63 6f 75 6e 74 | 2d 74 6f 2d 73 74 72 69 |ng-count|-to-stri|
|00002e10| 6e 67 20 28 63 61 6c 65 | 6e 64 61 72 2d 6d 61 79 |ng (cale|ndar-may|
|00002e20| 61 6e 2d 6c 6f 6e 67 2d | 63 6f 75 6e 74 2d 66 72 |an-long-|count-fr|
|00002e30| 6f 6d 2d 61 62 73 6f 6c | 75 74 65 20 28 63 61 6c |om-absol|ute (cal|
|00002e40| 65 6e 64 61 72 2d 61 62 | 73 6f 6c 75 74 65 2d 66 |endar-ab|solute-f|
|00002e50| 72 6f 6d 2d 67 72 65 67 | 6f 72 69 61 6e 20 28 63 |rom-greg|orian (c|
|00002e60| 61 6c 65 6e 64 61 72 2d | 63 75 72 72 65 6e 74 2d |alendar-|current-|
|00002e70| 64 61 74 65 29 29 29 29 | 29 29 29 29 20 28 69 66 |date))))|)))) (if|
|00002e80| 20 28 63 61 6c 65 6e 64 | 61 72 2d 6d 61 79 61 6e | (calend|ar-mayan|
|00002e90| 2d 6c 6f 6e 67 2d 63 6f | 75 6e 74 2d 63 6f 6d 6d |-long-co|unt-comm|
|00002ea0| 6f 6e 2d 65 72 61 20 64 | 61 74 75 6d 29 20 28 73 |on-era d|atum) (s|
|00002eb0| 65 74 71 20 6c 63 20 64 | 61 74 75 6d 29 29 29 29 |etq lc d|atum))))|
|00002ec0| 20 28 6c 69 73 74 20 6c | 63 29 29 5d 29 0a 23 40 | (list l|c))]).#@|
|00002ed0| 35 32 20 54 20 69 66 20 | 6c 6f 6e 67 20 63 6f 75 |52 T if |long cou|
|00002ee0| 6e 74 20 72 65 70 72 65 | 73 65 6e 74 73 20 64 61 |nt repre|sents da|
|00002ef0| 74 65 20 69 6e 20 74 68 | 65 20 43 6f 6d 6d 6f 6e |te in th|e Common|
|00002f00| 20 45 72 61 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 | Era...(|defalias|
|00002f10| 20 27 63 61 6c 65 6e 64 | 61 72 2d 6d 61 79 61 6e | 'calend|ar-mayan|
|00002f20| 2d 6c 6f 6e 67 2d 63 6f | 75 6e 74 2d 63 6f 6d 6d |-long-co|unt-comm|
|00002f30| 6f 6e 2d 65 72 61 20 23 | 5b 28 6c 63 29 20 22 c0 |on-era #|[(lc) ".|
|00002f40| c1 21 89 1a ab 90 0b 40 | 5c 6e 40 55 ab 89 0b 41 |.!.....@|\n@U...A|
|00002f50| 13 5c 6e 41 89 12 ac 70 | 0b 3f ae 85 0b 40 5c 6e |.\nA...p|.?...@\n|
|00002f60| 40 56 29 87 22 20 5b 63 | 61 6c 65 6e 64 61 72 2d |@V)." [c|alendar-|
|00002f70| 6d 61 79 61 6e 2d 6c 6f | 6e 67 2d 63 6f 75 6e 74 |mayan-lo|ng-count|
|00002f80| 2d 66 72 6f 6d 2d 61 62 | 73 6f 6c 75 74 65 20 31 |-from-ab|solute 1|
|00002f90| 20 62 61 73 65 20 6c 63 | 5d 20 33 20 28 23 24 20 | base lc|] 3 (#$ |
|00002fa0| 2e 20 31 31 39 38 37 29 | 5d 29 0a 23 40 37 30 20 |. 11987)|]).#@70 |
|00002fb0| 53 68 6f 77 20 74 68 65 | 20 4d 61 79 61 6e 20 6c |Show the| Mayan l|
|00002fc0| 6f 6e 67 20 63 6f 75 6e | 74 2c 20 68 61 61 62 2c |ong coun|t, haab,|
|00002fd0| 20 61 6e 64 20 74 7a 6f | 6c 6b 69 6e 20 64 61 74 | and tzo|lkin dat|
|00002fe0| 65 73 20 61 73 20 61 20 | 64 69 61 72 79 20 65 6e |es as a |diary en|
|00002ff0| 74 72 79 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |try...(d|efalias |
|00003000| 27 64 69 61 72 79 2d 6d | 61 79 61 6e 2d 64 61 74 |'diary-m|ayan-dat|
|00003010| 65 20 23 5b 6e 69 6c 20 | 22 c0 c1 c2 0b 21 5c 22 |e #[nil |"....!\"|
|00003020| 87 22 20 5b 66 6f 72 6d | 61 74 20 22 4d 61 79 61 |." [form|at "Maya|
|00003030| 6e 20 64 61 74 65 3a 20 | 25 73 22 20 63 61 6c 65 |n date: |%s" cale|
|00003040| 6e 64 61 72 2d 6d 61 79 | 61 6e 2d 64 61 74 65 2d |ndar-may|an-date-|
|00003050| 73 74 72 69 6e 67 20 64 | 61 74 65 5d 20 34 20 28 |string d|ate] 4 (|
|00003060| 23 24 20 2e 20 31 32 32 | 30 38 29 5d 29 0a 28 70 |#$ . 122|08)]).(p|
|00003070| 72 6f 76 69 64 65 20 27 | 63 61 6c 2d 6d 61 79 61 |rovide '|cal-maya|
|00003080| 6e 29 0a | |n). | |
+--------+-------------------------+-------------------------+--------+--------+